Class: FlowdockBuildNotifier::FlowdockMessageSender
- Inherits:
-
Object
- Object
- FlowdockBuildNotifier::FlowdockMessageSender
- Defined in:
- lib/flowdock_build_notifier/flowdock_message_sender.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ FlowdockMessageSender
constructor
A new instance of FlowdockMessageSender.
- #messages_path ⇒ Object
- #send_message(message) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ FlowdockMessageSender
Returns a new instance of FlowdockMessageSender.
9 10 11 12 13 |
# File 'lib/flowdock_build_notifier/flowdock_message_sender.rb', line 9 def initialize( = {}) = @config = .fetch(:config) { Configuration.load } @client = .fetch(:client) { Flowdock::Client.new(api_token: config.flowdock_user_token) } end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
7 8 9 |
# File 'lib/flowdock_build_notifier/flowdock_message_sender.rb', line 7 def client @client end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/flowdock_build_notifier/flowdock_message_sender.rb', line 7 def config @config end |
Instance Method Details
#messages_path ⇒ Object
19 20 21 |
# File 'lib/flowdock_build_notifier/flowdock_message_sender.rb', line 19 def raise NotImplementedError end |
#send_message(message) ⇒ Object
15 16 17 |
# File 'lib/flowdock_build_notifier/flowdock_message_sender.rb', line 15 def () raise NotImplementedError end |