class Fire::CLI
Fire’s command line interface.
Public Class Methods
autorun(argv=ARGV)
click to toggle source
Fire
her up in autorun mode!
# File lib/fire/cli.rb, line 16 def self.autorun(argv=ARGV) new(argv).autorun end
new(argv=ARGV)
click to toggle source
Initialize new instance of Fire::CLI
.
# File lib/fire/cli.rb, line 21 def initialize(argv=ARGV) @argv = argv end
run(argv=ARGV)
click to toggle source
Fire
her up!
# File lib/fire/cli.rb, line 11 def self.run(argv=ARGV) new(argv).run end
Public Instance Methods
autorun()
click to toggle source
Fire
her up in autorun mode!
# File lib/fire/cli.rb, line 37 def autorun args = cli_parse session.autorun(args) end
cli_parse()
click to toggle source
Parse command line arguments with just the prettiest little CLI
parser there ever was.
# File lib/fire/cli.rb, line 44 def cli_parse cli @argv, "-T" => method(:list_tasks), "-w" => method(:watch) end
list_tasks()
click to toggle source
Print out a list of availabe manual triggers.
# File lib/fire/cli.rb, line 51 def list_tasks puts "(#{session.root})" puts session.task_sheet exit end
run()
click to toggle source
Fire
her up!
# File lib/fire/cli.rb, line 31 def run args = cli_parse session.run(args) end
session()
click to toggle source
Returns session instance. [Session]
# File lib/fire/cli.rb, line 26 def session @session ||= Session.new(:watch=>@watch) end
watch(seconds)
click to toggle source
Set the watch wait period.
# File lib/fire/cli.rb, line 58 def watch(seconds) @watch = seconds end