Class: Moneta::Api::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/moneta/api/options.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


8
9
10
# File 'lib/moneta/api/options.rb', line 8

def demo?
  @params[:demo_mode]
end

#filterObject



20
21
22
# File 'lib/moneta/api/options.rb', line 20

def filter
  Array(@params[:filter])
end

#log_bodies?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/moneta/api/options.rb', line 16

def log_bodies?
  @params[:log_body]
end

#loggerObject



12
13
14
# File 'lib/moneta/api/options.rb', line 12

def logger
  @params[:logger]
end

#open_timeoutObject



24
25
26
# File 'lib/moneta/api/options.rb', line 24

def open_timeout
  @params[:open_timeout] || 100
end