Class: Atom::Pub::Workspace
- Inherits:
-
Object
- Object
- Atom::Pub::Workspace
- Includes:
- Xml::Parseable
- Defined in:
- lib/atom/pub.rb
Instance Method Summary collapse
-
#initialize(o = nil) {|_self| ... } ⇒ Workspace
constructor
A new instance of Workspace.
Methods included from Xml::Parseable
#==, #accessor_name, #current_node_is?, included, #next_node_is?, #parse, #to_xml
Constructor Details
#initialize(o = nil) {|_self| ... } ⇒ Workspace
Returns a new instance of Workspace.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/atom/pub.rb', line 87 def initialize(o = nil) @collections = [] case o when XML::Reader o.read parse(o) when Hash o.each do |k, v| self.send("#{k}=".to_sym, v) end end yield(self) if block_given? end |