Class: Fastball::CLI
- Inherits:
-
Object
- Object
- Fastball::CLI
- Defined in:
- lib/fastball/cli.rb
Constant Summary collapse
- HELP =
<<-DESC usage: fastball COMMAND [options] Fastball is the safest, fastest way to build and deploy dynamic applications. Commands: config - generate config files from erb templates Examples: fastball config DESC
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
Class Method Summary collapse
Instance Method Summary collapse
- #help_text ⇒ Object
-
#initialize(argv) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ CLI
Returns a new instance of CLI.
19 20 21 22 |
# File 'lib/fastball/cli.rb', line 19 def initialize(argv) @argv = argv @command = argv.shift end |
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
5 6 7 |
# File 'lib/fastball/cli.rb', line 5 def argv @argv end |
Class Method Details
.help_text ⇒ Object
24 25 26 |
# File 'lib/fastball/cli.rb', line 24 def self.help_text HELP.gsub(/^ {6}/, '') end |
Instance Method Details
#help_text ⇒ Object
28 29 30 |
# File 'lib/fastball/cli.rb', line 28 def help_text self.class.help_text end |