Class: Threatinator::Parsers::JSON::Record

Inherits:
Record
  • Object
show all
Defined in:
lib/threatinator/parsers/json/record.rb

Instance Attribute Summary collapse

Attributes inherited from Record

#data, #line_number, #pos_end, #pos_start

Instance Method Summary collapse

Methods inherited from Record

#eql?

Constructor Details

#initialize(object, opts = {}) ⇒ Record

Returns a new instance of Record.



8
9
10
11
# File 'lib/threatinator/parsers/json/record.rb', line 8

def initialize(object, opts = {})
  @key = opts.delete(:key)
  super(object, opts)
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



7
8
9
# File 'lib/threatinator/parsers/json/record.rb', line 7

def key
  @key
end

Instance Method Details

#==(other) ⇒ Object



13
14
15
16
# File 'lib/threatinator/parsers/json/record.rb', line 13

def ==(other)
  @key == other.key &&
    super(other)
end