class Talius::Node::Att
This class inherits from Talius::Node
and adds the value property.
Attributes
value[RW]
The value of the attribute rule, if there is one.
raw = 'a[href][rel=parent]' selector = Talius.new(raw) rule = selector.rules[0] rule.atts['href'].value # => nil rule.atts['rel'].value # => "parent"
Public Class Methods
new(*opts)
click to toggle source
Calls superclass method
Talius::Node::new
# File lib/talius.rb, line 690 def initialize(*opts) super(*opts) @value = nil end
Public Instance Methods
to_h()
click to toggle source
Returns a hash representation of the object.
Calls superclass method
Talius::Node#to_h
# File lib/talius.rb, line 723 def to_h rv = super() # value if @value rv['value'] = @value end return rv end