class YmlBuilder::Stats

Attributes

stats[R]

Public Class Methods

new() click to toggle source
# File lib/yml_builder/stats.rb, line 6
def initialize
  init_class
end

Public Instance Methods

add(key, value) click to toggle source
# File lib/yml_builder/stats.rb, line 20
def add(key, value)
  @stats[key] += value
end
init_class() click to toggle source
# File lib/yml_builder/stats.rb, line 11
def init_class
  @stats              = Hash.new
  @stats[:categories] = 0
  @stats[:total]      = 0
  @stats[:available]  = 0
  @stats[:price]      = 0
end