Class: Speedflow::Plugin::Flowdock::PluginCore
- Inherits:
-
Object
- Object
- Speedflow::Plugin::Flowdock::PluginCore
- Defined in:
- lib/speedflow/plugin/flowdock/plugin_core.rb
Overview
Plugin core
Instance Attribute Summary collapse
-
#client ⇒ Object
Public: Plugin client.
-
#config ⇒ Object
Public: Plugin configuration.
-
#prompt ⇒ Object
Public: Plugin prompt.
Instance Method Summary collapse
-
#action_notify ⇒ Object
Public: Notify.
-
#initialize(arguments) ⇒ PluginCore
constructor
Initialize.
Constructor Details
#initialize(arguments) ⇒ PluginCore
Initialize.
arguments - Hash of arguments.
Examples
Plugin.new({})
# => <Speedflow::Plugin::Flowdock::PluginCore>
Returns nothing.
28 29 30 |
# File 'lib/speedflow/plugin/flowdock/plugin_core.rb', line 28 def initialize(arguments) @arguments = arguments end |
Instance Attribute Details
#client ⇒ Object
Public: Plugin client.
Returns Client instance.
56 57 58 |
# File 'lib/speedflow/plugin/flowdock/plugin_core.rb', line 56 def client @client ||= Client.new(@config, @prompt) end |
#config ⇒ Object
Public: Plugin configuration.
Returns Configuration instance.
49 50 51 |
# File 'lib/speedflow/plugin/flowdock/plugin_core.rb', line 49 def config @config ||= Configuration.new(@arguments) end |
#prompt ⇒ Object
Public: Plugin prompt.
Returns Prompt instance.
63 64 65 |
# File 'lib/speedflow/plugin/flowdock/plugin_core.rb', line 63 def prompt @prompt ||= Prompt.new end |
Instance Method Details
#action_notify ⇒ Object
Public: Notify.
Returns nothing.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/speedflow/plugin/flowdock/plugin_core.rb', line 35 def action_notify flow_id_or_token = config.by_input('flow', config.by_config('flow')) = config.by_input('message') = config.by_input('tags').split(',') client.notify(flow_id_or_token, , ) prompt.ok '[FLOWDOCK] Flow was notified' end |