fix display command parser

This commit is contained in:
2026-04-13 13:58:42 +03:00
parent a420ba3ce2
commit 7a6f8974a8
2 changed files with 24 additions and 21 deletions

View File

@@ -17,7 +17,8 @@ module RubyAlgebra
end
def to_s
result = @lhs.is_a?(Array) ? @lhs.join(', ') : @lhs.to_s
result = "Assignment command: "
result += @lhs.is_a?(Array) ? @lhs.join(', ') : @lhs.to_s
result += ' := '
result += @operand1.to_s
case @operation
@@ -42,5 +43,11 @@ module RubyAlgebra
def initialize(polynomial)
@polynomial = polynomial
end
def to_s
result = "Display command: "
result += @polynomial.to_s
result
end
end
end