Class: Decontaminate::Decoder::ChildNodeProxy
- Inherits:
-
Object
- Object
- Decontaminate::Decoder::ChildNodeProxy
- Defined in:
- lib/decontaminate/decoder/child_node_proxy.rb
Instance Attribute Summary collapse
-
#decoder ⇒ Object
readonly
Returns the value of attribute decoder.
-
#xpath ⇒ Object
readonly
Returns the value of attribute xpath.
Instance Method Summary collapse
- #decode(this, xml_node) ⇒ Object
-
#initialize(xpath, decoder) ⇒ ChildNodeProxy
constructor
A new instance of ChildNodeProxy.
Constructor Details
#initialize(xpath, decoder) ⇒ ChildNodeProxy
Returns a new instance of ChildNodeProxy.
6 7 8 9 |
# File 'lib/decontaminate/decoder/child_node_proxy.rb', line 6 def initialize(xpath, decoder) @xpath = xpath @decoder = decoder end |
Instance Attribute Details
#decoder ⇒ Object (readonly)
Returns the value of attribute decoder.
4 5 6 |
# File 'lib/decontaminate/decoder/child_node_proxy.rb', line 4 def decoder @decoder end |
#xpath ⇒ Object (readonly)
Returns the value of attribute xpath.
4 5 6 |
# File 'lib/decontaminate/decoder/child_node_proxy.rb', line 4 def xpath @xpath end |
Instance Method Details
#decode(this, xml_node) ⇒ Object
11 12 13 14 |
# File 'lib/decontaminate/decoder/child_node_proxy.rb', line 11 def decode(this, xml_node) child = xml_node && xml_node.at_xpath(xpath) decoder.decode this, child end |