Class: ESI::Tag::Except
- Defined in:
- lib/esi/tag/except.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#buffers ⇒ Object
readonly
Returns the value of attribute buffers.
Attributes inherited from Container
#cache, #children, #closed, #name
Attributes inherited from Base
#attributes, #cache, #children, #closed, #name
Instance Method Summary collapse
- #add_child(tag) ⇒ Object
- #buffer(output, inner_html) ⇒ Object
-
#initialize(uri, headers, http_params, name, attrs, cache) ⇒ Except
constructor
A new instance of Except.
Methods inherited from Container
Methods included from Log
#log, #log_debug, #log_error, #log_request, #msg
Methods inherited from Base
#close, create, #prepare_url_vars
Constructor Details
#initialize(uri, headers, http_params, name, attrs, cache) ⇒ Except
Returns a new instance of Except.
10 11 12 13 14 15 |
# File 'lib/esi/tag/except.rb', line 10 def initialize(uri,headers,http_params,name,attrs,cache) super @buffers = [] # buffer output since this may only appear if the attempt block fails first @buffer_index = 0 @buffers[@buffer_index] = "" end |
Instance Attribute Details
#buffers ⇒ Object (readonly)
Returns the value of attribute buffers.
8 9 10 |
# File 'lib/esi/tag/except.rb', line 8 def buffers @buffers end |
Instance Method Details
#add_child(tag) ⇒ Object
17 18 19 20 21 |
# File 'lib/esi/tag/except.rb', line 17 def add_child(tag) super(tag) @buffer_index += 1 @buffers[@buffer_index] = "" end |
#buffer(output, inner_html) ⇒ Object
23 24 25 |
# File 'lib/esi/tag/except.rb', line 23 def buffer( output, inner_html ) @buffers[@buffer_index] << inner_html end |