Class: XML::Feed::Parser::Tag
- Inherits:
-
Object
- Object
- XML::Feed::Parser::Tag
- Defined in:
- lib/xml/libxml/feed/parser.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#property ⇒ Object
readonly
Returns the value of attribute property.
Instance Method Summary collapse
-
#initialize(name, data, properties) ⇒ Tag
constructor
A new instance of Tag.
- #to_s ⇒ Object (also: #to_str)
Constructor Details
#initialize(name, data, properties) ⇒ Tag
Returns a new instance of Tag.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/xml/libxml/feed/parser.rb', line 19 def initialize(name, data, properties) if properties @property = properties.to_h.dup else @property = { } end if data @data = data else @data = "" end @name = name.dup end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
17 18 19 |
# File 'lib/xml/libxml/feed/parser.rb', line 17 def data @data end |
#property ⇒ Object (readonly)
Returns the value of attribute property.
16 17 18 |
# File 'lib/xml/libxml/feed/parser.rb', line 16 def property @property end |
Instance Method Details
#to_s ⇒ Object Also known as: to_str
35 36 37 |
# File 'lib/xml/libxml/feed/parser.rb', line 35 def to_s @data.to_s end |