Module: ScopedStruct::ClassMethods
- Defined in:
- lib/scoped_struct.rb
Instance Method Summary collapse
Instance Method Details
#scope(scope_name, &block) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/scoped_struct.rb', line 4 def scope(scope_name, &block) MethodCarrier.set_scoped_methods(scope_name, block) self.extend MethodCarrier self.send(:define_method, scope_name) do ProxyObject.new(self, scope_name) end end |