Class: EsiForRack::Node
- Inherits:
-
Object
- Object
- EsiForRack::Node
- Defined in:
- lib/esi_for_rack/node.rb
Defined Under Namespace
Classes: Choose, Context, Include, Try, Vars
Constant Summary collapse
- IncludeFailedError =
Class.new(RuntimeError)
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
7 8 9 |
# File 'lib/esi_for_rack/node.rb', line 7 def context @context end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
7 8 9 |
# File 'lib/esi_for_rack/node.rb', line 7 def node @node end |
Instance Method Details
#execute_in_place! ⇒ Object
15 16 17 |
# File 'lib/esi_for_rack/node.rb', line 15 def execute_in_place! node.replace(Nokogiri::XML::CDATA.new(node.document, execute.to_s)) end |
#init(node, context) ⇒ Object
9 10 11 12 13 |
# File 'lib/esi_for_rack/node.rb', line 9 def init(node, context) @node = node @context = context self end |