Class: SnapshotInspector::Snapshot::ResponseType

Inherits:
Type
  • Object
show all
Defined in:
app/models/snapshot_inspector/snapshot/response_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#as_json, extract, from_hash, snapshotee, #type

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'app/models/snapshot_inspector/snapshot/response_type.rb', line 6

def body
  @body
end

Instance Method Details

#extract(snapshotee) ⇒ Object



9
10
11
# File 'app/models/snapshot_inspector/snapshot/response_type.rb', line 9

def extract(snapshotee)
  @body = snapshotee.parsed_body
end

#from_hash(hash) ⇒ Object



14
15
16
# File 'app/models/snapshot_inspector/snapshot/response_type.rb', line 14

def from_hash(hash)
  @body = hash[:body]
end