Class: Zillow4r::Images

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) ⇒ Images

Returns a new instance of Images.



110
111
112
113
114
115
116
# File 'lib/zillow4r/models.rb', line 110

def initialize(xml)
  super(xml)
  @images = []
  @data.children.each do |e|
    @images << e.inner_text.strip
  end
end

Instance Attribute Details

#imagesObject (readonly)

Returns the value of attribute images.



109
110
111
# File 'lib/zillow4r/models.rb', line 109

def images
  @images
end

Instance Method Details

#[](index) ⇒ Object



118
119
120
# File 'lib/zillow4r/models.rb', line 118

def [](index)
  @images[index]
end