Class: Droonga::Command
- Inherits:
-
Object
- Object
- Droonga::Command
- Defined in:
- lib/droonga/command.rb
Instance Attribute Summary collapse
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
Instance Method Summary collapse
-
#initialize(method_name, options) ⇒ Command
constructor
A new instance of Command.
- #match?(message) ⇒ Boolean
Constructor Details
#initialize(method_name, options) ⇒ Command
Returns a new instance of Command.
26 27 28 29 30 |
# File 'lib/droonga/command.rb', line 26 def initialize(method_name, ) @method_name = method_name @options = @matcher = MessageMatcher.new(@options[:pattern]) end |
Instance Attribute Details
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
20 21 22 |
# File 'lib/droonga/command.rb', line 20 def method_name @method_name end |
Instance Method Details
#match?(message) ⇒ Boolean
32 33 34 |
# File 'lib/droonga/command.rb', line 32 def match?() @matcher.match?() end |