Class: Superbolt::MessageHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/superbolt/message_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arguments, logger = nil) ⇒ MessageHandler

Returns a new instance of MessageHandler.



7
8
9
10
11
# File 'lib/superbolt/message_handler.rb', line 7

def initialize(arguments, logger=nil)
  @arguments = arguments
  @logger = logger
  parse_arguments
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



5
6
7
# File 'lib/superbolt/message_handler.rb', line 5

def arguments
  @arguments
end

#loggerObject (readonly)

Returns the value of attribute logger.



5
6
7
# File 'lib/superbolt/message_handler.rb', line 5

def logger
  @logger
end

Instance Method Details

#parse_argumentsObject



13
14
15
# File 'lib/superbolt/message_handler.rb', line 13

def parse_arguments
  # override if you want to extract important stuff at initialize
end

#performObject

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/superbolt/message_handler.rb', line 17

def perform
  raise NotImplementedError
end