Class: StandupMD::Post::Adapter

Inherits:
Object
  • Object
show all
Defined in:
lib/standup_md/post/adapter.rb

Overview

Base class for chat posting adapters.

Direct Known Subclasses

StandupMD::Post::Adapters::Slack

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Adapter

Creates an adapter.

Parameters:

  • options (Hash) (defaults to: {})


18
19
20
# File 'lib/standup_md/post/adapter.rb', line 18

def initialize(options = {})
  @options = symbolize_keys(options)
end

Instance Attribute Details

#optionsHash (readonly)

Adapter-specific non-secret options.

Returns:

  • (Hash)


12
13
14
# File 'lib/standup_md/post/adapter.rb', line 12

def options
  @options
end

Instance Method Details

#post(message) ⇒ StandupMD::Post::Result

Sends a message.

Parameters:

Returns:

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/standup_md/post/adapter.rb', line 28

def post(message)
  raise NotImplementedError, "#{self.class} must implement #post"
end