Class: Tumblr::Config
- Inherits:
-
Object
- Object
- Tumblr::Config
- Defined in:
- lib/tumblr/config.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#blog ⇒ Object
Returns the value of attribute blog.
-
#redis ⇒ Object
Returns the value of attribute redis.
Instance Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/tumblr/config.rb', line 3 def api_key @api_key end |
#blog ⇒ Object
Returns the value of attribute blog.
3 4 5 |
# File 'lib/tumblr/config.rb', line 3 def blog @blog end |
#redis ⇒ Object
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 |