Class: Zillow4r::Base

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

Direct Known Subclasses

Address, Api::Base, Images, Links, Posting, Property, Region, Zestimate

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XmlSearchHelper

included

Constructor Details

#initialize(xml_or_doc) ⇒ Base

Returns a new instance of Base.



76
77
78
79
80
# File 'lib/zillow4r/models.rb', line 76

def initialize(xml_or_doc)
  @data = xml_or_doc.is_a?(String) ? 
            Nokogiri::HTML(xml_or_doc) :
            xml_or_doc
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



75
76
77
# File 'lib/zillow4r/models.rb', line 75

def data
  @data
end