class Rbnotes::Commands::Statistics
Shows statistics.
Public Instance Methods
execute(args, conf)
click to toggle source
# File lib/rbnotes/commands/statistics.rb, line 11 def execute(args, conf) @opts = {} parse_opts(args) report = :total if @opts[:yearly] report = :yearly elsif @opts[:monthly] report = :monthly end stats = Rbnotes::Statistics.new(conf) case report when :yearly stats.yearly_report when :monthly stats.monthly_report else stats.total_report end end
help()
click to toggle source
# File lib/rbnotes/commands/statistics.rb, line 33 def help puts <<HELP usage: #{Rbnotes::NAME} statistics ([-y|--yearly]|[-m|--monthly]) option: -y, --yearly : print yearly report -m, --monthly : print monthly report Show statistics. In the version #{Rbnotes::VERSION}, only number of notes is supported. HELP end