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