Class: Centra::Rule::CLI
- Inherits:
-
Object
- Object
- Centra::Rule::CLI
- Defined in:
- lib/centra/rule/cli.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #help ⇒ Object
-
#initialize(name:, argv: ARGV) ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize(name:, argv: ARGV) ⇒ CLI
Returns a new instance of CLI.
11 12 13 14 15 16 |
# File 'lib/centra/rule/cli.rb', line 11 def initialize(name:, argv: ARGV) @name = name @options = {} @optparser = nil (argv, @name, @options) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/centra/rule/cli.rb', line 9 def @options end |
Instance Method Details
#help ⇒ Object
18 19 20 |
# File 'lib/centra/rule/cli.rb', line 18 def help @optparser.help end |