Class: Weigh::CLI
- Inherits:
-
Object
- Object
- Weigh::CLI
- Defined in:
- lib/weigh/cli.rb
Instance Attribute Summary collapse
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#runner ⇒ Object
readonly
Returns the value of attribute runner.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(flags) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
Instance Attribute Details
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
7 8 9 |
# File 'lib/weigh/cli.rb', line 7 def flags @flags end |
#runner ⇒ Object (readonly)
Returns the value of attribute runner.
8 9 10 |
# File 'lib/weigh/cli.rb', line 8 def runner @runner end |
Class Method Details
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/weigh/cli.rb', line 15 def run if flags.help? puts flags exit end runner.run end |