Class: Savon::Options

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

Direct Known Subclasses

GlobalOptions, LocalOptions

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Options

Returns a new instance of Options.



7
8
9
10
# File 'lib/savon/options.rb', line 7

def initialize(options = {})
  @options = {}
  assign options
end

Instance Method Details

#[](option) ⇒ Object



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

def [](option)
  @options[option]
end

#[]=(option, value) ⇒ Object



16
17
18
19
# File 'lib/savon/options.rb', line 16

def []=(option, value)
  value = [value].flatten
  self.send(option, *value)
end

#include?(option) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/savon/options.rb', line 21

def include?(option)
  @options.key? option
end