Class: Wrxer::Attribute

Inherits:
Struct
  • Object
show all
Defined in:
lib/wrxer/attribute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#coercionObject

Returns the value of attribute coercion

Returns:

  • (Object)

    the current value of coercion



2
3
4
# File 'lib/wrxer/attribute.rb', line 2

def coercion
  @coercion
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/wrxer/attribute.rb', line 2

def name
  @name
end

#xpathObject

Returns the value of attribute xpath

Returns:

  • (Object)

    the current value of 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