Module: ContentfulModel

Defined in:
lib/contentful_model/associations/associations.rb,
lib/contentful_model.rb,
lib/contentful_model/base.rb,
lib/contentful_model/query.rb,
lib/contentful_model/errors.rb,
lib/contentful_model/queries.rb,
lib/contentful_model/version.rb,
lib/contentful_model/chainable_queries.rb,
lib/contentful_model/associations/has_one.rb,
lib/contentful_model/associations/has_many.rb,
lib/contentful_model/associations/belongs_to.rb,
lib/contentful_model/associations/belongs_to_many.rb

Overview

A module to map relationships, a little like ActiveRecord::Relation This is necessary because Contentful::Link classes are not 2-way, so you can’t get the parent from a child.

Defined Under Namespace

Modules: Associations, ChainableQueries, Queries Classes: AssociationError, AttributeNotFoundError, Base, Configuration, Query

Constant Summary collapse

VERSION =
"0.1.0.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

access the configuration class as ContentfulModel.configuration



10
11
12
# File 'lib/contentful_model.rb', line 10

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

block for configuration.

Yields:



13
14
15
16
# File 'lib/contentful_model.rb', line 13

def configure
  self.configuration ||= Configuration.new
  yield(configuration)
end