Class: Hyperion::Kim::Request

Inherits:
Struct
  • Object
show all
Defined in:
lib/hyperion_test/kim.rb,
lib/hyperion_test/kim.rb

Overview

‘GET’ | ‘POST’ | …

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



31
32
33
# File 'lib/hyperion_test/kim.rb', line 31

def body
  @body
end

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



31
32
33
# File 'lib/hyperion_test/kim.rb', line 31

def headers
  @headers
end

#paramsObject

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



31
32
33
# File 'lib/hyperion_test/kim.rb', line 31

def params
  @params
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



31
32
33
# File 'lib/hyperion_test/kim.rb', line 31

def path
  @path
end

#verbObject Also known as: method

Returns the value of attribute verb

Returns:

  • (Object)

    the current value of verb



31
32
33
# File 'lib/hyperion_test/kim.rb', line 31

def verb
  @verb
end

Instance Method Details

#merge(other) ⇒ Object



38
39
40
# File 'lib/hyperion_test/kim.rb', line 38

def merge(other)
  merge_params(other.params)
end

#merge_params(other_params) ⇒ Object



41
42
43
44
# File 'lib/hyperion_test/kim.rb', line 41

def merge_params(other_params)
  params = OpenStruct.new(self.params.to_h.merge(other_params.to_h))
  Request.new(verb, path, params, headers, body)
end