class Locomotive::Coal::Resources::Sites

Public Instance Methods

by_handle(handle) click to toggle source

Only >= v3

# 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) click to toggle source

Only v2.x

# File lib/locomotive/coal/resources/sites.rb, line 7
def by_subdomain(subdomain)
  all.find { |site| site.subdomain == subdomain.to_s }
end