Class: MiniHTML::AST::Attr
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Base
#original_token, #position_end, #position_start
Instance Method Summary collapse
-
#initialize(token) ⇒ Attr
constructor
A new instance of Attr.
Constructor Details
#initialize(token) ⇒ Attr
Returns a new instance of Attr.
9 10 11 12 13 |
# File 'lib/minihtml/ast/attr.rb', line 9 def initialize(token) super @name = token[:literal] @value = nil end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/minihtml/ast/attr.rb', line 6 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/minihtml/ast/attr.rb', line 7 def value @value end |