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.
115 116 117 118 119 |
# File 'lib/mab/mixin.rb', line 115 def initialize @children = 0 @joining = false @options = {} end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
113 114 115 |
# File 'lib/mab/mixin.rb', line 113 def children @children end |
#options ⇒ Object
Returns the value of attribute options.
113 114 115 |
# File 'lib/mab/mixin.rb', line 113 def @options end |
Instance Method Details
#<<(str) ⇒ Object
121 122 123 124 |
# File 'lib/mab/mixin.rb', line 121 def <<(str) @children += 1 super(str) end |
#join ⇒ Object
126 127 128 129 |
# File 'lib/mab/mixin.rb', line 126 def join(*) @joining = true super end |
#joining? ⇒ Boolean
131 132 133 |
# File 'lib/mab/mixin.rb', line 131 def joining? @joining end |