Module: Lexically::ClassMethods
- Defined in:
- lib/lexically.rb
Instance Method Summary collapse
-
#lexically(&block) ⇒ Module
Returns a refinement refines the class or the module itself.
Instance Method Details
#lexically(&block) ⇒ Module
Returns a refinement refines the class or the module itself.
The refinement creates its scope cannot be visible from the outside of the class or the module.
44 45 46 47 48 49 |
# File 'lib/lexically.rb', line 44 def lexically(&block) klass = self Module.new { refine klass, &block } end |