Class: Wrxer::Attribute
- Inherits:
-
Struct
- Object
- Struct
- Wrxer::Attribute
- Defined in:
- lib/wrxer/attribute.rb
Instance Attribute Summary collapse
-
#coercion ⇒ Object
Returns the value of attribute coercion.
-
#name ⇒ Object
Returns the value of attribute name.
-
#xpath ⇒ Object
Returns the value of attribute xpath.
Instance Method Summary collapse
Instance Attribute Details
#coercion ⇒ Object
Returns the value of attribute coercion
2 3 4 |
# File 'lib/wrxer/attribute.rb', line 2 def coercion @coercion end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/wrxer/attribute.rb', line 2 def name @name end |
#xpath ⇒ Object
Returns the value of attribute xpath
2 3 4 |
# File 'lib/wrxer/attribute.rb', line 2 def xpath @xpath end |
Instance Method Details
#call(document, params = {}) ⇒ Object
3 4 5 |
# File 'lib/wrxer/attribute.rb', line 3 def call(document, params = {}) coercion.call(document, { xpath: xpath }) end |