Class: EzWadl::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/ezwadl/parser.rb

Class Method Summary collapse

Class Method Details

.parse(wadl) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# 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)
  }
end