Module: ContentfulModel

Defined in:
lib/contentful_model/associations.rb,
lib/contentful_model.rb,
lib/contentful_model/base.rb,
lib/contentful_model/query.rb,
lib/contentful_model/queries.rb,
lib/contentful_model/version.rb,
lib/contentful_model/chainable_queries.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: Base, Configuration, Query

Constant Summary collapse

VERSION =
"0.0.8"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

access the configuration class as ContentfulModel.configuration



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

def configuration
  @configuration
end

Class Method Details

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

block for configuration.

Yields:



15
16
17
18
# File 'lib/contentful_model.rb', line 15

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