Class: Locomotive::Coal::Resources::Sites
- Defined in:
- lib/locomotive/coal/resources/sites.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#by_handle(handle) ⇒ Object
Only >= v3.
-
#by_subdomain(subdomain) ⇒ Object
Only v2.x.
Methods inherited from Base
#create, #destroy, #destroy_all, #index, #initialize, #update, #update_with_locale
Methods included from Concerns::Request
#delete, #do_request, #get, #post, #put, #without_authentication
Constructor Details
This class inherits a constructor from Locomotive::Coal::Resources::Base
Instance Method Details
#by_handle(handle) ⇒ Object
Only >= v3
12 13 14 |
# File 'lib/locomotive/coal/resources/sites.rb', line 12 def by_handle(handle) all.find { |site| site.handle == handle.to_s } end |
#by_subdomain(subdomain) ⇒ Object
Only v2.x
7 8 9 |
# File 'lib/locomotive/coal/resources/sites.rb', line 7 def by_subdomain(subdomain) all.find { |site| site.subdomain == subdomain.to_s } end |