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.
25 26 27 |
# File 'lib/speedflow/plugin/flowdock/plugin_core.rb', line 25 def initialize(arguments) @arguments = arguments end |
Instance Attribute Details
#client ⇒ Object
Public: Plugin client.
Returns Client instance.
53 54 55 |
# File 'lib/speedflow/plugin/flowdock/plugin_core.rb', line 53 def client @client ||= Client.new(@config, @prompt) end |
#config ⇒ Object
Public: Plugin configuration.
Returns Configuration instance.
46 47 48 |
# File 'lib/speedflow/plugin/flowdock/plugin_core.rb', line 46 def config @config ||= Configuration.new(@arguments) end |
#prompt ⇒ Object
Public: Plugin prompt.
Returns Prompt instance.
60 61 62 |
# File 'lib/speedflow/plugin/flowdock/plugin_core.rb', line 60 def prompt @prompt ||= Prompt.new end |
Instance Method Details
#action_notify ⇒ Object
Public: Notify.
Returns nothing.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/speedflow/plugin/flowdock/plugin_core.rb', line 32 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 |