Class: H2o::BlockContext
Constant Summary
Constants inherited
from DataObject
DataObject::INTERNAL_METHOD
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from DataObject
#respond_to?
Constructor Details
#initialize(block, context, stream, index) ⇒ BlockContext
Returns a new instance of BlockContext.
141
142
143
|
# File 'lib/h2o/context.rb', line 141
def initialize(block, context, stream, index)
@block, @context, @stream, @index = block, context, stream, index
end
|
Class Method Details
.h2o_safe_methods ⇒ Object
133
134
135
|
# File 'lib/h2o/context.rb', line 133
def self.h2o_safe_methods
[:super]
end
|
Instance Method Details
150
151
152
|
# File 'lib/h2o/context.rb', line 150
def depth
@index.abs
end
|
154
155
156
|
# File 'lib/h2o/context.rb', line 154
def name
@block.name
end
|
145
146
147
148
|
# File 'lib/h2o/context.rb', line 145
def super
@block.parent.render(@context, @stream, @index-1) if @block.parent and @block.parent.stack_size > @index.abs
nil
end
|
137
138
139
|
# File 'lib/h2o/context.rb', line 137
def to_h2o
self
end
|