Sha256: c5016787a1acadcfa99d1629988f9e2ebb2f68e98380c8b1822200a44c6246db

Contents?: true

Size: 332 Bytes

Versions: 1

Compression:

Stored size: 332 Bytes

Contents

require 'models/glimmer/calculator/command'

module Glimmer
  class Calculator
    class Presenter
      attr_accessor :result
      
      def initialize
        self.result = '0'
      end
  
      def press(button)
        command = Command.for(button)
        self.result = command.result if command
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
glimmer-cs-calculator-1.0.0 lib/models/glimmer/calculator/presenter.rb