Class: Dashdate::App
- Inherits:
-
Object
- Object
- Dashdate::App
- Defined in:
- lib/app.rb
Instance Attribute Summary collapse
-
#arg_parser ⇒ Object
Returns the value of attribute arg_parser.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
Class Method Summary collapse
Instance Method Summary collapse
- #handle_args(args) ⇒ Object
-
#initialize(publisher, arg_parser) ⇒ App
constructor
A new instance of App.
Constructor Details
#initialize(publisher, arg_parser) ⇒ App
Returns a new instance of App.
10 11 12 13 |
# File 'lib/app.rb', line 10 def initialize publisher, arg_parser @publisher = publisher @arg_parser = arg_parser end |
Instance Attribute Details
#arg_parser ⇒ Object
Returns the value of attribute arg_parser.
6 7 8 |
# File 'lib/app.rb', line 6 def arg_parser @arg_parser end |
#publisher ⇒ Object
Returns the value of attribute publisher.
6 7 8 |
# File 'lib/app.rb', line 6 def publisher @publisher end |
Class Method Details
Instance Method Details
#handle_args(args) ⇒ Object
14 15 16 17 |
# File 'lib/app.rb', line 14 def handle_args args parsed = @arg_parser.parse(args) @publisher.update(parsed[:widget], parsed[:values], parsed[:auth]) end |