Class: Panda::CMS::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/panda-cms.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/panda-cms.rb', line 13

def initialize
  @title = "Demo Site"
  @require_login_to_view = false
  @authentication = {}
  @posts = {enabled: true, prefix: "blog"}
  @url = nil
  @instagram = {
    enabled: false,
    username: nil,
    access_token: nil
  }
  @analytics = {
    google_analytics: {
      enabled: false,
      tracking_id: nil
    }
  }
  @performance = {
    http_caching: {
      enabled: true,
      public: true
    },
    fragment_caching: {
      enabled: true,
      expires_in: 1.hour
    },
    cache_store: {
      type: :memory_store, # :memory_store, :redis_cache_store, :file_store
      redis_url: ENV.fetch("REDIS_URL", "redis://localhost:6379/0"),
      namespace: "panda_cms"
    }
  }
end

Instance Attribute Details

#analyticsObject

Returns the value of attribute analytics.



10
11
12
# File 'lib/panda-cms.rb', line 10

def analytics
  @analytics
end

#authenticationObject

Returns the value of attribute authentication.



10
11
12
# File 'lib/panda-cms.rb', line 10

def authentication
  @authentication
end

#instagramObject

Returns the value of attribute instagram.



10
11
12
# File 'lib/panda-cms.rb', line 10

def instagram
  @instagram
end

#performanceObject

Returns the value of attribute performance.



10
11
12
# File 'lib/panda-cms.rb', line 10

def performance
  @performance
end

#postsObject

Returns the value of attribute posts.



10
11
12
# File 'lib/panda-cms.rb', line 10

def posts
  @posts
end

#require_login_to_viewObject

Returns the value of attribute require_login_to_view.



10
11
12
# File 'lib/panda-cms.rb', line 10

def 
  @require_login_to_view
end

#titleObject

Returns the value of attribute title.



10
11
12
# File 'lib/panda-cms.rb', line 10

def title
  @title
end

#urlObject

Returns the value of attribute url.



10
11
12
# File 'lib/panda-cms.rb', line 10

def url
  @url
end