Class: ItemsPrinter
- Inherits:
-
Object
- Object
- ItemsPrinter
- Defined in:
- lib/itemsPrinter.rb
Instance Method Summary collapse
-
#initialize(items) ⇒ ItemsPrinter
constructor
A new instance of ItemsPrinter.
- #printItems ⇒ Object
Constructor Details
#initialize(items) ⇒ ItemsPrinter
Returns a new instance of ItemsPrinter.
5 6 7 |
# File 'lib/itemsPrinter.rb', line 5 def initialize(items) @items = items end |
Instance Method Details
#printItems ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/itemsPrinter.rb', line 9 def printItems puts '' puts '===========' puts ' Items ' puts '-----------' puts 'status | title' for item in @items given_title = item.getGivenTitle status = item.getStatus = item.getTags if !.empty? puts "#{status} | #{tags} #{given_title}" else puts "#{status} | #{given_title}" end end puts '===========' puts '' end |