Module: Kernel
- Defined in:
- lib/tesler/as.rb
Instance Method Summary collapse
-
#as(ancestor, &blk) ⇒ Object
Stolen from Facets.
Instance Method Details
#as(ancestor, &blk) ⇒ Object
Stolen from Facets. Allows one two execute a specific ancestor’s method
4 5 6 7 8 9 10 11 |
# File 'lib/tesler/as.rb', line 4 def as(ancestor, &blk) @__as ||= {} unless r = @__as[ancestor] r = (@__as[ancestor] = As.new(self, ancestor)) end r.instance_eval(&blk) if block_given? r end |