Class: Tumblr::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/tumblr/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



3
4
5
# File 'lib/tumblr/config.rb', line 3

def api_key
  @api_key
end

#blogObject

Returns the value of attribute blog.



3
4
5
# File 'lib/tumblr/config.rb', line 3

def blog
  @blog
end

#redisObject

Returns the value of attribute redis.



3
4
5
# File 'lib/tumblr/config.rb', line 3

def redis
  @redis
end

Instance Method Details

#load(path) ⇒ Object



5
6
7
8
9
10
# File 'lib/tumblr/config.rb', line 5

def load(path)
  config = YAML.load_file(path)["tumblr"]
  self.blog = config["blog"]
  self.api_key = config["api_key"]
  self.redis = config["redis"]
end