Class: FlickrbCollage::FlickrConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/flickrb_collage/flickr_config.rb

Class Method Summary collapse

Instance Method Summary collapse

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.expand_path("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

.callObject



16
17
18
# File 'lib/flickrb_collage/flickr_config.rb', line 16

def self.call
  new.call
end

Instance Method Details

#callObject



12
13
14
# File 'lib/flickrb_collage/flickr_config.rb', line 12

def call
  FlickRaw::Flickr.new
end