Class: Zillow4r::Links

Inherits:
Base
  • Object
show all
Defined in:
lib/zillow4r/models.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods included from XmlSearchHelper

included

Constructor Details

#initialize(xml) ⇒ Links

Returns a new instance of Links.



95
96
97
98
99
100
101
# File 'lib/zillow4r/models.rb', line 95

def initialize(xml)
  super(xml)
  @links = {}
  @data.children.each do |e|
    @links[e.name] = e.inner_text.strip
  end
end

Instance Attribute Details

Returns the value of attribute links.



94
95
96
# File 'lib/zillow4r/models.rb', line 94

def links
  @links
end

Instance Method Details

#[](name) ⇒ Object



103
104
105
# File 'lib/zillow4r/models.rb', line 103

def [](name)
  @links[name]
end