class Garbanzo::Parser

Attributes

raw_document[R]

Public Class Methods

new(raw_document) click to toggle source
# File lib/garbanzo/parser.rb, line 5
def initialize(raw_document)
  @raw_document = raw_document
end

Private Instance Methods

document() click to toggle source
# File lib/garbanzo/parser.rb, line 17
def document
  @document ||= Nokogiri::XML.parse raw_document
end
node(name) click to toggle source
# File lib/garbanzo/parser.rb, line 13
def node(name)
  document.search(name.to_s).text
end