Class: JsonProjection::Value

Inherits:
StreamEvent show all
Defined in:
lib/json-projection/parser/events.rb

Direct Known Subclasses

Boolean, Null, Number, String

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from StreamEvent

empty, #hash

Constructor Details

#initialize(value) ⇒ Value

Returns a new instance of Value.



56
57
58
# File 'lib/json-projection/parser/events.rb', line 56

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



55
56
57
# File 'lib/json-projection/parser/events.rb', line 55

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



60
61
62
63
# File 'lib/json-projection/parser/events.rb', line 60

def ==(other)
  return false unless super(other)
  return value == other.value
end