Class: PivotalShell::Commands::Update

Inherits:
PivotalShell::Command show all
Defined in:
lib/pivotal_shell/commands/update.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Update

Returns a new instance of Update.



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/pivotal_shell/commands/update.rb', line 3

def initialize(options)
  opts = OptionParser.new do |opts|
    opts.banner = "Update the stories database from Pivotal Tracker"
    
    opts.on_tail('--help', 'Show this help') do
      puts opts
      exit
    end
    opts.parse!(options)
  end
end

Instance Method Details

#executeObject



15
16
17
# File 'lib/pivotal_shell/commands/update.rb', line 15

def execute
  PivotalShell::Configuration.cache.refresh
end