Class: Irc::Bot::MessageMapper::Failure
- Defined in:
- lib/rbot/messagemapper.rb
Direct Known Subclasses
Constant Summary collapse
- STRING =
"template %{template} failed to recognize message %{message}"- FRIENDLY =
"I failed to understand the command"
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(tmpl, msg) ⇒ Failure
constructor
A new instance of Failure.
- #to_s ⇒ Object
Constructor Details
#initialize(tmpl, msg) ⇒ Failure
Returns a new instance of Failure.
61 62 63 64 |
# File 'lib/rbot/messagemapper.rb', line 61 def initialize(tmpl, msg) @template = tmpl = msg end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
60 61 62 |
# File 'lib/rbot/messagemapper.rb', line 60 def end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
59 60 61 |
# File 'lib/rbot/messagemapper.rb', line 59 def template @template end |
Instance Method Details
#to_s ⇒ Object
66 67 68 69 70 71 72 73 |
# File 'lib/rbot/messagemapper.rb', line 66 def to_s STRING % { :template => template.template, :regexp => template.regexp, :message => ., :action => template.[:action] } end |