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.



119
120
121
# File 'lib/simple_websocket_vcr/cassette.rb', line 119

def data
  @data
end

#operationObject

Returns the value of attribute operation.



119
120
121
# File 'lib/simple_websocket_vcr/cassette.rb', line 119

def operation
  @operation
end

#typeObject

Returns the value of attribute type.



119
120
121
# File 'lib/simple_websocket_vcr/cassette.rb', line 119

def type
  @type
end

Class Method Details

.parse(obj) ⇒ Object



121
122
123
124
125
126
127
# File 'lib/simple_websocket_vcr/cassette.rb', line 121

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