Module: HAR::Serializable

Included in:
Archive, SchemaType
Defined in:
lib/har/serializable.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



7
8
9
# File 'lib/har/serializable.rb', line 7

def ==(other)
  other.kind_of?(self.class) && as_json == other.as_json
end

#as_jsonObject



13
14
15
# File 'lib/har/serializable.rb', line 13

def as_json
  @data
end

#inspectObject



3
4
5
# File 'lib/har/serializable.rb', line 3

def inspect
  '#<%s:0x%s>' % [self.class.name, self.hash.to_s(16)]
end

#to_json(*args) ⇒ Object



17
18
19
# File 'lib/har/serializable.rb', line 17

def to_json(*args)
  as_json.to_json(*args)
end