Class: WebSocketVCR::RecordEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_websocket_vcr/cassette.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data.



131
132
133
# File 'lib/simple_websocket_vcr/cassette.rb', line 131

def data
  @data
end

#operationObject

Returns the value of attribute operation.



131
132
133
# File 'lib/simple_websocket_vcr/cassette.rb', line 131

def operation
  @operation
end

#typeObject

Returns the value of attribute type.



131
132
133
# File 'lib/simple_websocket_vcr/cassette.rb', line 131

def type
  @type
end

Class Method Details

.parse(obj) ⇒ Object



133
134
135
136
137
138
139
# File 'lib/simple_websocket_vcr/cassette.rb', line 133

def self.parse(obj)
  record_entry = RecordEntry.new
  record_entry.operation = obj['operation']
  record_entry.type = obj['type'] if obj['type']
  record_entry.data = obj['data'] if obj['data']
  record_entry
end