Class: Patm::CaseBinder
- Inherits:
-
Object
- Object
- Patm::CaseBinder
- Defined in:
- lib/patm.rb
Instance Method Summary collapse
- #===(obj) ⇒ Object
- #[](i) ⇒ Object
-
#initialize(pat) ⇒ CaseBinder
constructor
A new instance of CaseBinder.
Constructor Details
#initialize(pat) ⇒ CaseBinder
Returns a new instance of CaseBinder.
648 649 650 651 |
# File 'lib/patm.rb', line 648 def initialize(pat) @pat = pat @match = Match.new end |
Instance Method Details
#===(obj) ⇒ Object
653 654 655 |
# File 'lib/patm.rb', line 653 def ===(obj) @pat.execute(@match, obj) end |
#[](i) ⇒ Object
657 |
# File 'lib/patm.rb', line 657 def [](i); @match[i]; end |