Sha256: 2d9579299d5f87f25a93967ed35d1c5ad641c2bd3b07f570e9bbe464c54fdbbd
Contents?: true
Size: 436 Bytes
Versions: 2
Compression:
Stored size: 436 Bytes
Contents
require 'twiauth' require 'yaml' require 'json' def pull_config yml_config = YAML.load_file(File.dirname(__FILE__) + "/config.yml") yml_config.each do |key, value| instance_variable_set("@#{key}", value) end end def parse_json(object) JSON.parser.new(object).parse end def assign(key, value, object) object.instance_variable_set("@#{key}", value) end def pull(key, object) object.instance_variable_get("@#{key}") end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
twiauth-0.0.2 | spec/spec_helper.rb |
twiauth-0.0.1 | spec/spec_helper.rb |