class Estreet::AssignmentExpression
Public Class Methods
new(left, right, operator="=")
click to toggle source
# File lib/estreet/assignment_expression.rb, line 3 def initialize(left, right, operator="=") # TODO: InvalidOperatorError Estreet.assert_valid_operator(ASSIGNMENT_OPERATORS, operator) @op = operator @right = right.to_expression @left = if left.respond_to? :to_pattern left.to_pattern else # left.to_expression # TODO: Test this! Expression.coerce(left) end end
Public Instance Methods
attributes()
click to toggle source
Calls superclass method
# File lib/estreet/assignment_expression.rb, line 18 def attributes super.merge(operator: @op, left: @left, right: @right) end