Class: ChatSDK::Testing::RecordedCall

Inherits:
Object
  • Object
show all
Defined in:
lib/chat_sdk/testing/recorded_call.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method_name, **arguments) ⇒ RecordedCall

Returns a new instance of RecordedCall.



8
9
10
11
# File 'lib/chat_sdk/testing/recorded_call.rb', line 8

def initialize(method_name, **arguments)
  @method_name = method_name
  @arguments = arguments
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



6
7
8
# File 'lib/chat_sdk/testing/recorded_call.rb', line 6

def arguments
  @arguments
end

#method_nameObject (readonly)

Returns the value of attribute method_name.



6
7
8
# File 'lib/chat_sdk/testing/recorded_call.rb', line 6

def method_name
  @method_name
end

Instance Method Details

#[](key) ⇒ Object



13
14
15
# File 'lib/chat_sdk/testing/recorded_call.rb', line 13

def [](key)
  @arguments[key]
end

#to_hObject



17
18
19
# File 'lib/chat_sdk/testing/recorded_call.rb', line 17

def to_h
  {method: @method_name}.merge(@arguments)
end