Class: Fixer::Feed

Inherits:
Object
  • Object
show all
Defined in:
lib/fixer/feed.rb

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Feed

Returns a new instance of Feed.



6
7
8
# File 'lib/fixer/feed.rb', line 6

def initialize(type)
  @type = type
end

Instance Method Details

#getObject



10
11
12
13
14
15
# File 'lib/fixer/feed.rb', line 10

def get
  doc = Nokogiri::XML(feed)
  doc.xpath('/gesmes:Envelope/xmlns:Cube/xmlns:Cube', doc.root.namespaces).map do |node|
    Builder.new(node).build
  end
end