Class: GreenButtonData::Feed

Inherits:
Object
  • Object
show all
Defined in:
lib/green-button-data/feed.rb

Class Method Summary collapse

Class Method Details

.fetch(url, options) ⇒ Object



3
4
5
6
# File 'lib/green-button-data/feed.rb', line 3

def self.fetch(url, options)
  block = block_given? ? Proc.new : nil
  conn = Faraday.new url, options, &block
end

.parse(xml) ⇒ Object



8
9
10
# File 'lib/green-button-data/feed.rb', line 8

def self.parse(xml)
  GreenButtonData::Parser::Feed.parse xml
end