Module: FlexmlsApi::Primary
- Included in:
- Models::Account::Address, Models::Account::Email, Models::Account::Phone, Models::Account::Website
- Defined in:
- lib/flexmls_api/primary_array.rb
Overview
Primary: interface to implement for elements that are added to a “PrimaryArray” collection
Instance Method Summary collapse
-
#primary? ⇒ Boolean
Return true if the element is the primary resource in a collection.
Instance Method Details
#primary? ⇒ Boolean
Return true if the element is the primary resource in a collection. Default implementation looks for a “Primary” attribute
25 26 27 |
# File 'lib/flexmls_api/primary_array.rb', line 25 def primary? @attributes.key?("Primary") && self.Primary == true end |