lib/high_chart.rb
# read a yaml file of defaults and write out the options
read a yaml file of defaults and write out the options
read a yaml file of defaults and write out the options
def read_defaults(config_file)
    begin
      defaults = YAML.load_file(config_file)
      unless defaults == false
        defaults.each do |k, v|
          if self.respond_to?(k.to_sym)
            self.instance_variable_set(("@" + k.to_s).to_sym, v)
          end
        end
      end
    rescue Exception => e
      puts e.message
      puts e.backtrace
      raise e
    end
  end
def read_defaults ( config_file ) begin defaults = YAML . load_file ( config_file ) unless defaults == false defaults . each do | k , v | if self . respond_to? ( k . to_sym ) self . instance_variable_set ( ( "@" + k . to_s ) . to_sym , v ) end end end rescue Exception => e puts e . message puts e . backtrace raise e end end
read a yaml file of defaults and write out the options
read a yaml file of defaults and write out the options
config_file