Module: Trackstar

Defined in:
lib/trackstar.rb,
lib/trackstar/version.rb

Defined Under Namespace

Classes: Log, LogHelper, Post

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.call(options) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/trackstar.rb', line 7

def self.call(options)
  if options[:new]
    Trackstar::LogHelper.setup_log
  elsif Trackstar::LogHelper.check_for_existing_log(Dir.pwd)
    if options[:destroy]
      Trackstar::LogHelper.destroy_log
    elsif options[:stats]
      Trackstar::LogHelper.show_stats
    elsif options[:post]
      Trackstar::LogHelper.create_post
    elsif options[:list]
      Trackstar::LogHelper.list_posts(options[:limit])
    end
  else
    Trackstar::LogHelper.missing_log
  end
end