Class: Petfinder::Breeds
- Inherits:
-
Object
- Object
- Petfinder::Breeds
- Defined in:
- lib/petfinder/breeds.rb
Instance Method Summary collapse
- #breeds ⇒ Object
-
#initialize(xml) ⇒ Breeds
constructor
A new instance of Breeds.
Constructor Details
#initialize(xml) ⇒ Breeds
Returns a new instance of Breeds.
4 5 6 |
# File 'lib/petfinder/breeds.rb', line 4 def initialize(xml) @xml = xml end |
Instance Method Details
#breeds ⇒ Object
8 9 10 |
# File 'lib/petfinder/breeds.rb', line 8 def breeds @xml.xpath("//breeds/breed").map(&:text) end |