Module: ARBookFinder::Configuration
- Included in:
- ARBookFinder
- Defined in:
- lib/ar_book_finder/configuration.rb
Constant Summary collapse
- VALID_OPTION_KEYS =
[ :user_type ]
- DEFAULT_USER_TYPE =
nil.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
11 12 13 |
# File 'lib/ar_book_finder/configuration.rb', line 11 def self.extended(base) base.reset end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
15 16 17 |
# File 'lib/ar_book_finder/configuration.rb', line 15 def configure yield self end |
#options ⇒ Object
19 20 21 22 23 |
# File 'lib/ar_book_finder/configuration.rb', line 19 def VALID_OPTION_KEYS.inject({}) do |option, key| option.merge!(key => send(key)) end end |
#reset ⇒ Object
25 26 27 |
# File 'lib/ar_book_finder/configuration.rb', line 25 def reset self.user_type = DEFAULT_USER_TYPE end |