--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: used to set the method name used as a fallback for unmatched messages. The default fallback is a method called &quot;usage&quot;.
  name: fallback
  rw: W
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: MessageMapper is a class designed to reduce the amount of regexps and string parsing plugins and bot modules need to do, in order to process and respond to messages.
- !ruby/struct:SM::Flow::P 
  body: You add templates to the MessageMapper which are examined by the handle method when handling a message. The templates tell the mapper which method in its parent class (your class) to invoke for that message. The string is split, optionally defaulted and validated before being passed to the matched method.
- !ruby/struct:SM::Flow::P 
  body: A template such as &quot;foo :option :otheroption&quot; will match the string &quot;foo bar baz&quot; and, by default, result in method <tt>foo</tt> being called, if present, in the parent class. It will receive two parameters, the message (derived from BasicUserMessage) and a Hash containing
- !ruby/struct:SM::Flow::VERB 
  body: "  {:option =&gt; &quot;bar&quot;, :otheroption =&gt; &quot;baz&quot;}\n"
- !ruby/struct:SM::Flow::P 
  body: "See the #map method for more details."
constants: []

full_name: Irc::Bot::MessageMapper
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: each
- !ruby/object:RI::MethodSummary 
  name: handle
- !ruby/object:RI::MethodSummary 
  name: last
- !ruby/object:RI::MethodSummary 
  name: map
name: MessageMapper
superclass: Object
