Class: Gammo::Tokenizer::Tag
- Inherits:
-
Object
- Object
- Gammo::Tokenizer::Tag
- Defined in:
- lib/gammo/tokenizer.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#name ⇒ Object
Returns the value of attribute name.
-
#self_closing ⇒ Object
Returns the value of attribute self_closing.
Instance Method Summary collapse
-
#initialize(name:, attributes: [], self_closing: false) ⇒ Tag
constructor
A new instance of Tag.
- #self_closing? ⇒ Boolean
Constructor Details
#initialize(name:, attributes: [], self_closing: false) ⇒ Tag
Returns a new instance of Tag.
213 214 215 216 217 |
# File 'lib/gammo/tokenizer.rb', line 213 def initialize(name:, attributes: [], self_closing: false) @name = name @attributes = attributes @self_closing = self_closing end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
211 212 213 |
# File 'lib/gammo/tokenizer.rb', line 211 def attributes @attributes end |
#name ⇒ Object
Returns the value of attribute name.
211 212 213 |
# File 'lib/gammo/tokenizer.rb', line 211 def name @name end |
#self_closing ⇒ Object
Returns the value of attribute self_closing.
211 212 213 |
# File 'lib/gammo/tokenizer.rb', line 211 def self_closing @self_closing end |
Instance Method Details
#self_closing? ⇒ Boolean
219 220 221 |
# File 'lib/gammo/tokenizer.rb', line 219 def self_closing? !!self_closing end |