Class: WCC::Contentful::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/wcc/contentful.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



20
21
22
23
24
# File 'lib/wcc/contentful.rb', line 20

def initialize
  @access_token = ""
  @space = ""
  @default_locale = ""
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



18
19
20
# File 'lib/wcc/contentful.rb', line 18

def access_token
  @access_token
end

#default_localeObject

Returns the value of attribute default_locale.



18
19
20
# File 'lib/wcc/contentful.rb', line 18

def default_locale
  @default_locale
end

#spaceObject

Returns the value of attribute space.



18
19
20
# File 'lib/wcc/contentful.rb', line 18

def space
  @space
end

Class Method Details

.configure_contentful_modelObject



26
27
28
29
30
31
32
# File 'lib/wcc/contentful.rb', line 26

def self.configure_contentful_model
  ContentfulModel.configure do |config|
    config.access_token = WCC::Contentful.configuration.access_token
    config.space = WCC::Contentful.configuration.space
    config.default_locale = WCC::Contentful.configuration.default_locale
  end
end