Class: Idml::Parts::Raw
- Inherits:
-
Object
- Object
- Idml::Parts::Raw
- Includes:
- Idml::Part
- Defined in:
- lib/idml/parts/raw.rb
Overview
Fallback part class for entries the gem does not yet model typed. Wraps the raw XML verbatim — lossless round-trip, no typed access. As typed models are added under Idml::Parts::*, fewer entries will route through Raw.
Instance Attribute Summary collapse
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(xml) ⇒ Raw
constructor
A new instance of Raw.
- #to_xml ⇒ Object
Constructor Details
#initialize(xml) ⇒ Raw
Returns a new instance of Raw.
12 13 14 |
# File 'lib/idml/parts/raw.rb', line 12 def initialize(xml) @xml = xml end |
Instance Attribute Details
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
16 17 18 |
# File 'lib/idml/parts/raw.rb', line 16 def xml @xml end |
Class Method Details
.from_xml(xml) ⇒ Object
18 19 20 |
# File 'lib/idml/parts/raw.rb', line 18 def self.from_xml(xml) new(xml) end |
Instance Method Details
#to_xml ⇒ Object
22 23 24 |
# File 'lib/idml/parts/raw.rb', line 22 def to_xml(*) @xml end |