module ADAM6050::Handler

Handlers are, for the most part, simple transformations that accept a state, an incomming message, a session and a sender and produce a new state as well as an optional reply. The only

Constants

MESSAGE_PREAMBLE

@return [String] the first letters of the message that should be used when

determining if the handler can handle it.

Public Instance Methods

handles?(msg) click to toggle source

@param msg [String] the incomming message. @return [true] if the handler can handle the message. @return [false] otherwise.

# File lib/adam6050/handler.rb, line 15
def handles?(msg)
  msg.start_with? self.class::MESSAGE_PREAMBLE
end
validate?() click to toggle source

@return [true] if the handler requires the sender to be validated.

# File lib/adam6050/handler.rb, line 20
def validate?
  true
end