Class: Speedflow::Plugin::Flowdock::Prompt
- Inherits:
-
Object
- Object
- Speedflow::Plugin::Flowdock::Prompt
- Defined in:
- lib/speedflow/plugin/flowdock/prompt.rb
Overview
Plugin prompt
Instance Attribute Summary collapse
-
#prompt ⇒ Object
Public: TTY prompt.
Instance Method Summary collapse
-
#errors(exception) ⇒ Object
Public: Errors from Flowdock exception.
-
#method_missing(method, *args, &block) ⇒ Object
Delegate.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
Delegate.
method - Method. args - Arguments. block - Block.
Returns wathever.
29 30 31 |
# File 'lib/speedflow/plugin/flowdock/prompt.rb', line 29 def method_missing(method, *args, &block) prompt.send(method, *args, &block) end |
Instance Attribute Details
#prompt ⇒ Object
Public: TTY prompt.
Returns ::TTY::Prompt instance.
36 37 38 |
# File 'lib/speedflow/plugin/flowdock/prompt.rb', line 36 def prompt @prompt ||= ::TTY::Prompt.new end |
Instance Method Details
#errors(exception) ⇒ Object
Public: Errors from Flowdock exception.
exception - Flowdock::ApiError.
Returns nothing.
17 18 19 20 |
# File 'lib/speedflow/plugin/flowdock/prompt.rb', line 17 def errors(exception) prompt.error 'Flowdock errors' prompt.warn exception. end |