Class: SData::AtomExtensions::Nodes::Payload
- Inherits:
-
Object
- Object
- SData::AtomExtensions::Nodes::Payload
- Includes:
- Atom::Xml::Parseable
- Defined in:
- lib/s_data/atom_extensions/nodes/payload.rb
Instance Attribute Summary collapse
-
#raw_xml ⇒ Object
Returns the value of attribute raw_xml.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(xml = nil) ⇒ Payload
constructor
A new instance of Payload.
- #to_xml(*params) ⇒ Object
Constructor Details
#initialize(xml = nil) ⇒ Payload
Returns a new instance of Payload.
13 14 15 16 17 18 |
# File 'lib/s_data/atom_extensions/nodes/payload.rb', line 13 def initialize(xml=nil) # temporary, until have time to add Linking atom extension @raw_xml = xml.read_inner_xml xml.read parse(xml) end |
Instance Attribute Details
#raw_xml ⇒ Object
Returns the value of attribute raw_xml.
6 7 8 |
# File 'lib/s_data/atom_extensions/nodes/payload.rb', line 6 def raw_xml @raw_xml end |
Class Method Details
.parse(xml) ⇒ Object
20 21 22 |
# File 'lib/s_data/atom_extensions/nodes/payload.rb', line 20 def self.parse(xml) new(xml) end |
Instance Method Details
#to_xml(*params) ⇒ Object
24 25 26 27 28 |
# File 'lib/s_data/atom_extensions/nodes/payload.rb', line 24 def to_xml(*params) node = XML::Node.new("sdata:payload") node << content return node end |