Class: Hamlize::CLI
- Inherits:
-
Object
- Object
- Hamlize::CLI
- Defined in:
- lib/hamlize/cli.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(args = []) ⇒ CLI
constructor
A new instance of CLI.
- #start! ⇒ Object
Constructor Details
#initialize(args = []) ⇒ CLI
Returns a new instance of CLI.
5 6 7 8 |
# File 'lib/hamlize/cli.rb', line 5 def initialize(args=[]) @args = args @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/hamlize/cli.rb', line 3 def @options end |
Instance Method Details
#start! ⇒ Object
10 11 12 13 |
# File 'lib/hamlize/cli.rb', line 10 def start! OptionParser.new(&method(:set_opts)).parse!(@args) @options[:auto] ? auto! : default! end |