Class: Adhearsion::VoIP::MatchCalculator
- Defined in:
- lib/adhearsion/voip/menu_state_machine/matchers.rb
Direct Known Subclasses
FixnumMatchCalculator, RangeMatchCalculator, StringMatchCalculator
Instance Attribute Summary collapse
-
#match_payload ⇒ Object
readonly
Returns the value of attribute match_payload.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pattern, match_payload) ⇒ MatchCalculator
constructor
A new instance of MatchCalculator.
Constructor Details
#initialize(pattern, match_payload) ⇒ MatchCalculator
Returns a new instance of MatchCalculator.
31 32 33 |
# File 'lib/adhearsion/voip/menu_state_machine/matchers.rb', line 31 def initialize(pattern, match_payload) @pattern, @match_payload = pattern, match_payload end |
Instance Attribute Details
#match_payload ⇒ Object (readonly)
Returns the value of attribute match_payload.
30 31 32 |
# File 'lib/adhearsion/voip/menu_state_machine/matchers.rb', line 30 def match_payload @match_payload end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
30 31 32 |
# File 'lib/adhearsion/voip/menu_state_machine/matchers.rb', line 30 def pattern @pattern end |
Class Method Details
.build_with_pattern(pattern, match_payload, &block) ⇒ Object
9 10 11 |
# File 'lib/adhearsion/voip/menu_state_machine/matchers.rb', line 9 def build_with_pattern(pattern, match_payload, &block) class_for_pattern_type(pattern.class.name).new(pattern, match_payload, &block) end |
.inherited(klass) ⇒ Object
13 14 15 |
# File 'lib/adhearsion/voip/menu_state_machine/matchers.rb', line 13 def inherited(klass) subclasses << klass end |