Skip to content

Commit

Permalink
Refactor cell
Browse files Browse the repository at this point in the history
  • Loading branch information
project-eutopia committed Nov 22, 2018
1 parent 2f79144 commit e57d0aa
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions lib/keisan/ast/cell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,28 +73,10 @@ def to_node
node
end

def <(other)
node < other.to_node
end

def <=(other)
node <= other.to_node
end

def >(other)
node > other.to_node
end

def >=(other)
node >= other.to_node
end

def equal(other)
node.equal(other.to_node)
end

def not_equal(other)
node.not_equal(other.to_node)
%i(< <= > >= equal not_equal).each do |sym|
define_method(sym) {|other|
node.send(sym, other.to_node)
}
end
end
end
Expand Down

0 comments on commit e57d0aa

Please sign in to comment.