Module: ReversePolishCalculator::Output

Defined in:
lib/reverse-polish-calculator/output.rb

Class Method Summary collapse

Class Method Details

.add(str) ⇒ Object



4
5
6
# File 'lib/reverse-polish-calculator/output.rb', line 4

def self.add(str)
  texts.push(str)
end

.clearObject



16
17
18
# File 'lib/reverse-polish-calculator/output.rb', line 16

def self.clear
  texts.clear
end

.displayObject



12
13
14
# File 'lib/reverse-polish-calculator/output.rb', line 12

def self.display
  Helpers.multi_puts(*texts)
end

.textsObject



8
9
10
# File 'lib/reverse-polish-calculator/output.rb', line 8

def self.texts
  @texts ||= []
end