Class: Moneta::Api::Options
- Inherits:
-
Object
- Object
- Moneta::Api::Options
- Defined in:
- lib/moneta/api/options.rb
Instance Method Summary collapse
- #demo? ⇒ Boolean
- #filter ⇒ Object
-
#initialize(params) ⇒ Options
constructor
A new instance of Options.
- #log_bodies? ⇒ Boolean
- #logger ⇒ Object
- #open_timeout ⇒ Object
Constructor Details
#initialize(params) ⇒ Options
Returns a new instance of Options.
4 5 6 |
# File 'lib/moneta/api/options.rb', line 4 def initialize(params) @params = params end |
Instance Method Details
#demo? ⇒ Boolean
8 9 10 |
# File 'lib/moneta/api/options.rb', line 8 def demo? @params[:demo_mode] end |
#filter ⇒ Object
20 21 22 |
# File 'lib/moneta/api/options.rb', line 20 def filter Array(@params[:filter]) end |
#log_bodies? ⇒ Boolean
16 17 18 |
# File 'lib/moneta/api/options.rb', line 16 def log_bodies? @params[:log_body] end |
#logger ⇒ Object
12 13 14 |
# File 'lib/moneta/api/options.rb', line 12 def logger @params[:logger] end |
#open_timeout ⇒ Object
24 25 26 |
# File 'lib/moneta/api/options.rb', line 24 def open_timeout @params[:open_timeout] || 100 end |