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.
-
#async_diff_handler ⇒ Object
Returns the value of attribute async_diff_handler.
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
-
#cache_matcher ⇒ Object
Returns the value of attribute cache_matcher.
-
#diff_approach ⇒ Object
Returns the value of attribute diff_approach.
-
#diff_depth_separator ⇒ Object
Returns the value of attribute diff_depth_separator.
-
#hierarchy ⇒ Object
Returns the value of attribute hierarchy.
-
#history_limit ⇒ Object
Returns the value of attribute history_limit.
-
#migration_token ⇒ Object
Returns the value of attribute migration_token.
-
#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.
-
#stagename ⇒ Object
Returns the value of attribute stagename.
-
#stages ⇒ Object
Returns the value of attribute stages.
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.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/flexite/configuration.rb', line 9 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 @diff_depth_separator = ' -> ' @diff_approach = :sync @stages = [] @cache_matcher = -> (pattern) { Regexp.new(pattern) } 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 |
#async_diff_handler ⇒ Object
Returns the value of attribute async_diff_handler.
5 6 7 |
# File 'lib/flexite/configuration.rb', line 5 def async_diff_handler @async_diff_handler end |
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
7 8 9 |
# File 'lib/flexite/configuration.rb', line 7 def cache @cache end |
#cache_matcher ⇒ Object
Returns the value of attribute cache_matcher.
6 7 8 |
# File 'lib/flexite/configuration.rb', line 6 def cache_matcher @cache_matcher end |
#diff_approach ⇒ Object
Returns the value of attribute diff_approach.
5 6 7 |
# File 'lib/flexite/configuration.rb', line 5 def diff_approach @diff_approach end |
#diff_depth_separator ⇒ Object
Returns the value of attribute diff_depth_separator.
5 6 7 |
# File 'lib/flexite/configuration.rb', line 5 def diff_depth_separator @diff_depth_separator 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 |
#migration_token ⇒ Object
Returns the value of attribute migration_token.
4 5 6 |
# File 'lib/flexite/configuration.rb', line 4 def migration_token @migration_token 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 |
#stagename ⇒ Object
Returns the value of attribute stagename.
6 7 8 |
# File 'lib/flexite/configuration.rb', line 6 def stagename @stagename end |
#stages ⇒ Object
Returns the value of attribute stages.
6 7 8 |
# File 'lib/flexite/configuration.rb', line 6 def stages @stages end |
Instance Method Details
#cache_store=(*args) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/flexite/configuration.rb', line 23 def cache_store=(*args) @cache = ActiveSupport::Cache.lookup_store(*args) if @cache.[:namespace].blank? @cache.[:namespace] = :flexite end end |