add subs command variant
This commit is contained in:
@@ -21,6 +21,8 @@ module RubyAlgebra
|
||||
result += @lhs.is_a?(Array) ? @lhs.join(', ') : @lhs.to_s
|
||||
if @operation == :diff
|
||||
result += ' := Diff(' + @operand1.to_s + @operand2.map { |v| ", #{v}"}.join + ')'
|
||||
elsif @operation == :subs
|
||||
result += ' := Subs(' + @operand1.to_s + @operand2.map { |variable, value| ", #{variable}=#{value}"}.join + ')'
|
||||
else
|
||||
result += ' := ' + @operand1.to_s
|
||||
case @operation
|
||||
|
||||
Reference in New Issue
Block a user