Class: JsonProjection::Key
- Inherits:
-
StreamEvent
- Object
- StreamEvent
- JsonProjection::Key
- Defined in:
- lib/json-projection/parser/events.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #hash ⇒ Object
-
#initialize(key) ⇒ Key
constructor
A new instance of Key.
Methods inherited from StreamEvent
Constructor Details
#initialize(key) ⇒ Key
Returns a new instance of Key.
40 41 42 |
# File 'lib/json-projection/parser/events.rb', line 40 def initialize(key) @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
39 40 41 |
# File 'lib/json-projection/parser/events.rb', line 39 def key @key end |
Instance Method Details
#==(other) ⇒ Object
44 45 46 47 |
# File 'lib/json-projection/parser/events.rb', line 44 def ==(other) return false unless super(other) return key == other.key end |
#hash ⇒ Object
49 50 51 |
# File 'lib/json-projection/parser/events.rb', line 49 def hash key.hash end |