class PocketConsole

Public Class Methods

new(taggedItems, untaggedItems, readTaggedItems, readUntaggedItems) click to toggle source
# File lib/pocketConsole.rb, line 3
def initialize(taggedItems, untaggedItems, readTaggedItems, readUntaggedItems)
  @taggedItems = taggedItems
  @untaggedItems = untaggedItems
  @readTaggedItems = readTaggedItems
  @readUntaggedItems = readUntaggedItems    
  @tagCollection = TagCollection.new(taggedItems)
end

Public Instance Methods

printGeneralStats() click to toggle source
# File lib/pocketConsole.rb, line 19
def printGeneralStats
  itemStats = ItemStats.new(
    @taggedItems, @untaggedItems,
    @readTaggedItems, @readUntaggedItems
  )
  itemStats.print
end
printItems() click to toggle source
# File lib/pocketConsole.rb, line 37
def printItems
  items = @taggedItems + @untaggedItems
  itemsPrinter = ItemsPrinter.new(items)
end
printSpecificTermsStats(terms) click to toggle source
# File lib/pocketConsole.rb, line 32
def printSpecificTermsStats(terms)
    tagStats = TagStats.new(@tagCollection)
    tagStats.printSpecificTerms(terms)
end
printStats() click to toggle source
# File lib/pocketConsole.rb, line 11
def printStats
  puts ''
  printGeneralStats
  puts ''
  printTagStats
  puts ''
end
printTagStats() click to toggle source
# File lib/pocketConsole.rb, line 27
def printTagStats
  tagStats = TagStats.new(@tagCollection)
  tagStats.print
end