Class: Romanesco::ParenthesesOperator

Inherits:
UnaryOperator show all
Defined in:
lib/romanesco/elements/parentheses_operator.rb

Instance Attribute Summary

Attributes inherited from UnaryOperator

#operand, #symbol

Attributes inherited from Operator

#symbol

Attributes inherited from Expression

#parent

Instance Method Summary collapse

Methods inherited from UnaryOperator

#evaluate, #insert_element, #insert_element_to_left, #insert_element_to_right, #to_s

Methods inherited from Operator

#check_for_blank_symbol, #connect, #connect_in_place, #connect_in_place_with_parent, #connect_to_left, #connect_to_right, #connect_up_tree, #evaluate, #precedence, #precedence=

Methods inherited from Expression

#evaluate

Constructor Details

#initialize(symbol) ⇒ ParenthesesOperator

Returns a new instance of ParenthesesOperator.



6
7
8
# File 'lib/romanesco/elements/parentheses_operator.rb', line 6

def initialize(symbol)
  @symbol = '()'
end

Instance Method Details

#default_precedenceObject



10
11
12
# File 'lib/romanesco/elements/parentheses_operator.rb', line 10

def default_precedence
  100
end