Class: FlickrbCollage::FlickrConfig
- Inherits:
-
Object
- Object
- FlickrbCollage::FlickrConfig
- Defined in:
- lib/flickrb_collage/flickr_config.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(config_file = File.expand_path("config/flickr.yml")) ⇒ FlickrConfig
constructor
A new instance of FlickrConfig.
Constructor Details
#initialize(config_file = File.expand_path("config/flickr.yml")) ⇒ FlickrConfig
Returns a new instance of FlickrConfig.
6 7 8 9 10 |
# File 'lib/flickrb_collage/flickr_config.rb', line 6 def initialize(config_file = File.("config/flickr.yml")) configs = YAML.load_file(config_file)['flickr'] FlickRaw.api_key = configs["api_key"] FlickRaw.shared_secret = configs["secret"] end |
Class Method Details
.call ⇒ Object
16 17 18 |
# File 'lib/flickrb_collage/flickr_config.rb', line 16 def self.call new.call end |
Instance Method Details
#call ⇒ Object
12 13 14 |
# File 'lib/flickrb_collage/flickr_config.rb', line 12 def call FlickRaw::Flickr.new end |