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.



115
116
117
118
119
# File 'lib/mab/mixin.rb', line 115

def initialize
  @children = 0
  @joining = false
  @options = {}
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



113
114
115
# File 'lib/mab/mixin.rb', line 113

def children
  @children
end

#optionsObject

Returns the value of attribute options.



113
114
115
# File 'lib/mab/mixin.rb', line 113

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

#joinObject



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

def join(*)
  @joining = true
  super
end

#joining?Boolean

Returns:

  • (Boolean)


131
132
133
# File 'lib/mab/mixin.rb', line 131

def joining?
  @joining
end