Class: AlgebraDB::Build::Op

Inherits:
Struct
  • Object
show all
Defined in:
lib/algebra_db/build/op.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#lhsObject

Returns the value of attribute lhs

Returns:

  • (Object)

    the current value of lhs



3
4
5
# File 'lib/algebra_db/build/op.rb', line 3

def lhs
  @lhs
end

#operatorObject

Returns the value of attribute operator

Returns:

  • (Object)

    the current value of operator



3
4
5
# File 'lib/algebra_db/build/op.rb', line 3

def operator
  @operator
end

#rhsObject

Returns the value of attribute rhs

Returns:

  • (Object)

    the current value of rhs



3
4
5
# File 'lib/algebra_db/build/op.rb', line 3

def rhs
  @rhs
end

Instance Method Details

#render_syntax(builder) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/algebra_db/build/op.rb', line 4

def render_syntax(builder)
  builder.parenthesize do
    lhs.render_syntax(builder)
    builder.text(operator.to_s)
    rhs.render_syntax(builder)
  end
end