Class: Uinit::Structure::AttributeScope
- Inherits:
-
Object
- Object
- Uinit::Structure::AttributeScope
- Includes:
- AttributeContext
- Defined in:
- lib/uinit/structure/attribute_scope.rb
Instance Method Summary collapse
-
#initialize(context) ⇒ AttributeScope
constructor
A new instance of AttributeScope.
- #method_missing(name) ⇒ Object
- #scope(&scope) ⇒ Object
Methods included from AttributeContext
#abstract, #attr, #defaults, #private, #using
Constructor Details
#initialize(context) ⇒ AttributeScope
Returns a new instance of AttributeScope.
8 9 10 |
# File 'lib/uinit/structure/attribute_scope.rb', line 8 def initialize(context) self.context = context end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
18 19 20 |
# File 'lib/uinit/structure/attribute_scope.rb', line 18 def method_missing(name, ...) context.send(name, ...) end |
Instance Method Details
#scope(&scope) ⇒ Object
12 13 14 15 16 |
# File 'lib/uinit/structure/attribute_scope.rb', line 12 def scope(&scope) instance_eval(&scope) if scope self end |