Class: Atom::Pub::Service
- Inherits:
-
Object
- Object
- Atom::Pub::Service
- Includes:
- Xml::Parseable
- Defined in:
- lib/atom/pub.rb
Instance Method Summary collapse
-
#initialize(xml = nil) {|_self| ... } ⇒ Service
constructor
A new instance of Service.
Methods included from Xml::Parseable
#==, #accessor_name, #current_node_is?, included, #next_node_is?, #parse, #to_xml
Constructor Details
#initialize(xml = nil) {|_self| ... } ⇒ Service
Returns a new instance of Service.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/atom/pub.rb', line 36 def initialize(xml = nil) @workspaces = [] if xml if next_node_is?(xml, 'service', Atom::Pub::NAMESPACE) xml.read parse(xml) else raise ArgumentError, "XML document was missing atom:service" end end yield(self) if block_given? end |