Method: Patm::Rule::Compiled#initialize
- Defined in:
- lib/patm.rb
#initialize(src_body, context) ⇒ Compiled
Returns a new instance of Compiled.
607 608 609 610 611 612 613 614 615 616 617 618 619 620 |
# File 'lib/patm.rb', line 607 def initialize(src_body, context) @src_body = src_body @context = context @src = " def apply(_obj, _self = nil)\n _ctx = @context\n _match = {}\n\#{@src_body}\n end\n RUBY\n\n singleton_class = class <<self; self; end\n singleton_class.class_eval(@src)\nend\n" |