Class: EzWadl::Parser
- Inherits:
-
Object
- Object
- EzWadl::Parser
- Defined in:
- lib/ezwadl/parser.rb
Class Method Summary collapse
Class Method Details
.parse(wadl) {|top_resources| ... } ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ezwadl/parser.rb', line 7 def parse(wadl) doc = Nokogiri::XML open(wadl) top_resources = uris(doc).map {|xml| Resource.new(xml) } top_resources.each {|r| add_methods(r) add_resources(r) } yield(top_resources) if block_given? top_resources end |