Class: RestAssured::Config::ConfigHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/rest-assured/config.rb

Instance Method Summary collapse

Constructor Details

#initialize(default_values = {}) ⇒ ConfigHash

Returns a new instance of ConfigHash.



6
7
8
9
# File 'lib/rest-assured/config.rb', line 6

def initialize(default_values = {})
  super()
  self.merge!(default_values)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/rest-assured/config.rb', line 11

def method_missing(meth, *args)
  meth = meth.to_s

  if meth.sub!(/=/, '')
    self[meth.to_sym] = args.first
  else
    self[meth.to_sym]
  end
end