Class: SparkApi::Models::VirtualTour
- Extended by:
- Subresource
- Includes:
- Concerns::Destroyable, Concerns::Savable, Media
- Defined in:
- lib/spark_api/models/virtual_tour.rb
Constant Summary
Constants included from Paginate
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #branded? ⇒ Boolean
- #description ⇒ Object
- #display_image ⇒ Object
- #unbranded? ⇒ Boolean
- #url ⇒ Object
Methods included from Subresource
build_subclass, find_by_id, find_by_listing_key, parse_date_start_and_end_times
Methods included from Concerns::Savable
#create!, #params_for_save, #post_data, #save, #save!, #update!, #update_attributes
Methods included from Concerns::Destroyable
#destroy, #destroy!, #destroyed?, included
Methods included from Media
#automatic?, #private?, #public?
Methods inherited from Base
connection, #connection, count, element_name, element_name=, first, get, #id, #initialize, #load, #method_missing, #parse_id, path, #path, #persisted?, prefix, prefix=, #resource_pluralized, #resource_uri, #respond_to?, #to_param, #to_partial_path
Methods included from Paginate
#collect, #paginate, #per_page
Methods included from Dirty
#changed, #changed?, #changed_attributes, #changes, #dirty_attributes, #previous_changes
Constructor Details
This class inherits a constructor from SparkApi::Models::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class SparkApi::Models::Base
Instance Method Details
#branded? ⇒ Boolean
12 13 14 |
# File 'lib/spark_api/models/virtual_tour.rb', line 12 def branded? attributes["Type"] == "branded" end |
#description ⇒ Object
24 25 26 |
# File 'lib/spark_api/models/virtual_tour.rb', line 24 def description attributes['Name'] end |
#display_image ⇒ Object
28 29 30 31 |
# File 'lib/spark_api/models/virtual_tour.rb', line 28 def display_image # Currently we have no universally good mechanism to get images for virtual tours return nil end |
#unbranded? ⇒ Boolean
16 17 18 |
# File 'lib/spark_api/models/virtual_tour.rb', line 16 def unbranded? attributes["Type"] == "unbranded" end |
#url ⇒ Object
20 21 22 |
# File 'lib/spark_api/models/virtual_tour.rb', line 20 def url attributes['Uri'] end |