Class: Threatinator::Parsers::JSON::Record
- Defined in:
- lib/threatinator/parsers/json/record.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Attributes inherited from Record
#data, #line_number, #pos_end, #pos_start
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(object, opts = {}) ⇒ Record
constructor
A new instance of Record.
Methods inherited from Record
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
#key ⇒ Object (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 |