class Locomotive::Coal::Resources::ContentTypes

Public Instance Methods

by_slug(slug) click to toggle source
# File lib/locomotive/coal/resources/content_types.rb, line 6
def by_slug(slug)
  get('content_types').each do |attributes|
    return Resource.new(attributes) if attributes['slug'].to_s == slug.to_s
  end
  nil
end
method_missing(meth, *args) click to toggle source
Calls superclass method
# File lib/locomotive/coal/resources/content_types.rb, line 13
def method_missing(meth, *args)
  if content_type = by_slug(meth)
    Locomotive::Coal::Resources::ContentEntries.new(uri, credentials, content_type)
  else
    super
  end
end