Class: Gemometer::CLI
- Inherits:
-
Object
- Object
- Gemometer::CLI
- Defined in:
- lib/gemometer/cli.rb
Instance Attribute Summary collapse
-
#notifier_name ⇒ Object
readonly
Returns the value of attribute notifier_name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ CLI
constructor
A new instance of CLI.
- #notify ⇒ Object
Constructor Details
#initialize(args) ⇒ CLI
Returns a new instance of CLI.
10 11 12 13 14 |
# File 'lib/gemometer/cli.rb', line 10 def initialize(args) @notifier_name = args.shift = OpenStruct.new parse_args(args) end |
Instance Attribute Details
#notifier_name ⇒ Object (readonly)
Returns the value of attribute notifier_name.
8 9 10 |
# File 'lib/gemometer/cli.rb', line 8 def notifier_name @notifier_name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/gemometer/cli.rb', line 8 def end |
Class Method Details
.start(args) ⇒ Object
16 17 18 |
# File 'lib/gemometer/cli.rb', line 16 def self.start(args) new(args).notify end |
Instance Method Details
#notify ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/gemometer/cli.rb', line 20 def notify begin .gems = gems notifier_class.new(.to_h).notify rescue Gemometer::NotifyError => e abort(e.) end end |