Class: Denso::Calendar::Cli
- Inherits:
-
Object
- Object
- Denso::Calendar::Cli
- Defined in:
- lib/denso/calendar/cli.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Cli
constructor
A new instance of Cli.
- #load_formatter ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ Cli
Returns a new instance of Cli.
15 16 17 18 19 20 21 22 23 |
# File 'lib/denso/calendar/cli.rb', line 15 def initialize(argv) require 'optparse' opt = OptionParser.new opt.on('-t TYPE', '--type TYPE') { |v| v } opt.on('-f FORMATTER', '--formatter FORMATTER') { |v| v } @options = {} opt.parse(argv, into: @options) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
13 14 15 |
# File 'lib/denso/calendar/cli.rb', line 13 def @options end |
Class Method Details
.run(options) ⇒ Object
9 10 11 |
# File 'lib/denso/calendar/cli.rb', line 9 def self.run() new().run end |