Class: Sakuramochi::Condition::Nodes::Term

Inherits:
Node
  • Object
show all
Defined in:
lib/sakuramochi/condition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operator, value) ⇒ Term

Returns a new instance of Term.



25
26
27
28
# File 'lib/sakuramochi/condition.rb', line 25

def initialize(operator, value)
  @operator = operator
  @value = value
end

Instance Attribute Details

#operatorObject (readonly)

Returns the value of attribute operator.



24
25
26
# File 'lib/sakuramochi/condition.rb', line 24

def operator
  @operator
end

#valueObject (readonly)

Returns the value of attribute value.



24
25
26
# File 'lib/sakuramochi/condition.rb', line 24

def value
  @value
end

Instance Method Details

#inspectObject



30
31
32
# File 'lib/sakuramochi/condition.rb', line 30

def inspect
  "(#{@operator} #{@value.inspect})"
end