Class: Literal::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/literal/value.rb

Direct Known Subclasses

IntegerValue, StringValue

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



4
5
6
# File 'lib/literal/value.rb', line 4

def value
  @value
end

Instance Method Details

#===(other) ⇒ Object



10
11
12
# File 'lib/literal/value.rb', line 10

def ===(other)
	self.class === other && @value == other.value
end

#inspectObject



6
7
8
# File 'lib/literal/value.rb', line 6

def inspect
	"#{self.class.name}(#{@value.inspect})"
end