Class: Flexite::Configuration
- Inherits:
-
Object
- Object
- Flexite::Configuration
- Defined in:
- lib/flexite/configuration.rb
Instance Attribute Summary collapse
-
#app_link ⇒ Object
Returns the value of attribute app_link.
-
#app_name ⇒ Object
Returns the value of attribute app_name.
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
-
#hierarchy ⇒ Object
Returns the value of attribute hierarchy.
-
#history_limit ⇒ Object
Returns the value of attribute history_limit.
-
#paths ⇒ Object
Returns the value of attribute paths.
-
#root_cache_key ⇒ Object
Returns the value of attribute root_cache_key.
-
#source_roots ⇒ Object
Returns the value of attribute source_roots.
Instance Method Summary collapse
- #cache_store=(*args) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 15 |
# File 'lib/flexite/configuration.rb', line 7 def initialize @paths = {} @root_cache_key = 'all-cached-nodes' @cache = ActiveSupport::Cache::MemoryStore.new(size: 64.megabytes) @app_link = '/' @source_roots = {} @hierarchy = {} @history_limit = 10 end |
Instance Attribute Details
#app_link ⇒ Object
Returns the value of attribute app_link.
4 5 6 |
# File 'lib/flexite/configuration.rb', line 4 def app_link @app_link end |
#app_name ⇒ Object
Returns the value of attribute app_name.
4 5 6 |
# File 'lib/flexite/configuration.rb', line 4 def app_name @app_name end |
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
5 6 7 |
# File 'lib/flexite/configuration.rb', line 5 def cache @cache end |
#hierarchy ⇒ Object
Returns the value of attribute hierarchy.
3 4 5 |
# File 'lib/flexite/configuration.rb', line 3 def hierarchy @hierarchy end |
#history_limit ⇒ Object
Returns the value of attribute history_limit.
4 5 6 |
# File 'lib/flexite/configuration.rb', line 4 def history_limit @history_limit end |
#paths ⇒ Object
Returns the value of attribute paths.
3 4 5 |
# File 'lib/flexite/configuration.rb', line 3 def paths @paths end |
#root_cache_key ⇒ Object
Returns the value of attribute root_cache_key.
3 4 5 |
# File 'lib/flexite/configuration.rb', line 3 def root_cache_key @root_cache_key end |
#source_roots ⇒ Object
Returns the value of attribute source_roots.
3 4 5 |
# File 'lib/flexite/configuration.rb', line 3 def source_roots @source_roots end |
Instance Method Details
#cache_store=(*args) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/flexite/configuration.rb', line 17 def cache_store=(*args) @cache = ActiveSupport::Cache.lookup_store(*args) if @cache.[:namespace].blank? @cache.[:namespace] = :flexite end end |