Class: Aviary::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/aviary/configuration.rb

Instance Method Summary collapse

Constructor Details

#initialize(envrionment, config = {}) ⇒ Configuration

Returns a new instance of Configuration.



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/aviary/configuration.rb', line 3

def initialize(envrionment, config = {})
  @config            = {}
  @config[:source]   = config[:source] || Dir.pwd
  @config[:dest]     = config[:dest] || File.join(@config[:source], '_site')
  @config[:query]    = config[:query]
  @config[:per_page] = config[:per_page]
  @config[:limit]    = config[:limit]

  ImageHost::Flickr.api_key(config[:flickr_api_key])
  
  send(envrionment)
end

Instance Method Details

#[](key) ⇒ Object

Get the value for the given key.

Returns value.



19
20
21
# File 'lib/aviary/configuration.rb', line 19

def [](key)
  @config[key]
end