Module: BookWorm::Configuration

Extended by:
Configuration
Included in:
Configuration
Defined in:
lib/book_worm/configuration.rb

Overview

Configuration

Module for storing configuration settings

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

Returns the value of attribute config.



9
10
11
# File 'lib/book_worm/configuration.rb', line 9

def config
  @config
end

Instance Method Details

#configure {|@config| ... } ⇒ Object

Provides a method client to specify their ISBNDB API key.

Example

BookWorm::Configuration.configure do |c|

c[:api_key] = YOUR_ISBNDB_API_KEY

end

Yields:



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

def configure
  yield @config
end