Class: Mab::Mixin::Context
- Inherits:
-
Array
- Object
- Array
- Mab::Mixin::Context
- Defined in:
- lib/mab/mixin.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #<<(str) ⇒ Object
-
#initialize ⇒ Context
constructor
A new instance of Context.
- #join ⇒ Object
- #joining? ⇒ Boolean
Constructor Details
#initialize ⇒ Context
Returns a new instance of Context.
130 131 132 133 134 |
# File 'lib/mab/mixin.rb', line 130 def initialize @children = 0 @joining = false @options = {} end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
128 129 130 |
# File 'lib/mab/mixin.rb', line 128 def children @children end |
#options ⇒ Object
Returns the value of attribute options.
128 129 130 |
# File 'lib/mab/mixin.rb', line 128 def @options end |
Instance Method Details
#<<(str) ⇒ Object
136 137 138 139 |
# File 'lib/mab/mixin.rb', line 136 def <<(str) @children += 1 super(str) end |
#join ⇒ Object
141 142 143 144 |
# File 'lib/mab/mixin.rb', line 141 def join(*) @joining = true super end |
#joining? ⇒ Boolean
146 147 148 |
# File 'lib/mab/mixin.rb', line 146 def joining? @joining end |