Class: Mab::Mixin::Context

Inherits:
Array
  • Object
show all
Defined in:
lib/mab/mixin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContext

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

#childrenObject

Returns the value of attribute children.



128
129
130
# File 'lib/mab/mixin.rb', line 128

def children
  @children
end

#optionsObject

Returns the value of attribute options.



128
129
130
# File 'lib/mab/mixin.rb', line 128

def options
  @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

#joinObject



141
142
143
144
# File 'lib/mab/mixin.rb', line 141

def join(*)
  @joining = true
  super
end

#joining?Boolean

Returns:

  • (Boolean)


146
147
148
# File 'lib/mab/mixin.rb', line 146

def joining?
  @joining
end