Sha256: bb8c7ddf325dae6fe225e9e388c4bb7aa9fb533db73bfbf05c6290a5daab7465
Contents?: true
Size: 548 Bytes
Versions: 8
Compression:
Stored size: 548 Bytes
Contents
module Glimmer class Calculator class Command class Number < Command keywords ('0'..'9').to_a def execute self.result = last_result.nil? || (!last_command.number? && !last_command.point?) ? button : last_result + button if operation.nil? || last_command.equals? self.number1 = self.result self.number2 = nil self.operation = nil else self.number2 = self.result end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems