Class: FlexmlsApi::Models::IdxLink
- Defined in:
- lib/flexmls_api/models/idx_link.rb
Constant Summary collapse
- LINK_TYPES =
["QuickSearch", "SavedSearch", "MyListings", "Roster"]
Constants included from Paginate
Instance Attribute Summary
Attributes inherited from Base
#attributes, #changed, #errors
Class Method Summary collapse
-
.find(*arguments) ⇒ Object
TODO Work all below into common base class.
- .first(*arguments) ⇒ Object
- .last(*arguments) ⇒ Object
Methods inherited from Base
#connection, connection, count, element_name, element_name=, get, #initialize, #load, #method_missing, #parse_id, path, prefix, prefix=, #respond_to?
Methods included from Paginate
#collect, #paginate, #per_page
Constructor Details
This class inherits a constructor from FlexmlsApi::Models::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FlexmlsApi::Models::Base
Class Method Details
.find(*arguments) ⇒ Object
TODO Work all below into common base class
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/flexmls_api/models/idx_link.rb', line 9 def self.find(*arguments) scope = arguments.slice!(0) = arguments.slice!(0) || {} case scope when :all then find_every() when :first then find_every().first when :last then find_every().last when :one then find_one() else find_single(scope, ) end end |
.first(*arguments) ⇒ Object
22 23 24 |
# File 'lib/flexmls_api/models/idx_link.rb', line 22 def self.first(*arguments) find(:first, *arguments) end |
.last(*arguments) ⇒ Object
26 27 28 |
# File 'lib/flexmls_api/models/idx_link.rb', line 26 def self.last(*arguments) find(:last, *arguments) end |