Module: Chanko::Config
- Defined in:
- lib/chanko/config.rb
Class Attribute Summary collapse
-
.auto_reload ⇒ Object
Returns the value of attribute auto_reload.
-
.backtrace_limit ⇒ Object
Returns the value of attribute backtrace_limit.
-
.cache_units ⇒ Object
Returns the value of attribute cache_units.
-
.compatible_css_class ⇒ Object
Returns the value of attribute compatible_css_class.
-
.enable_logger ⇒ Object
Returns the value of attribute enable_logger.
-
.propagated_errors ⇒ Object
Returns the value of attribute propagated_errors.
-
.proxy_method_name ⇒ Object
Returns the value of attribute proxy_method_name.
-
.raise_error ⇒ Object
Returns the value of attribute raise_error.
Class Method Summary collapse
- .reset ⇒ Object
- .resolver_for_using_rails_and_env ⇒ Object
- .units_directory_path ⇒ Object
- .units_directory_path=(path) ⇒ Object
Class Attribute Details
.auto_reload ⇒ Object
Returns the value of attribute auto_reload.
6 7 8 |
# File 'lib/chanko/config.rb', line 6 def auto_reload @auto_reload end |
.backtrace_limit ⇒ Object
Returns the value of attribute backtrace_limit.
6 7 8 |
# File 'lib/chanko/config.rb', line 6 def backtrace_limit @backtrace_limit end |
.cache_units ⇒ Object
Returns the value of attribute cache_units.
6 7 8 |
# File 'lib/chanko/config.rb', line 6 def cache_units @cache_units end |
.compatible_css_class ⇒ Object
Returns the value of attribute compatible_css_class.
6 7 8 |
# File 'lib/chanko/config.rb', line 6 def compatible_css_class @compatible_css_class end |
.enable_logger ⇒ Object
Returns the value of attribute enable_logger.
6 7 8 |
# File 'lib/chanko/config.rb', line 6 def enable_logger @enable_logger end |
.propagated_errors ⇒ Object
Returns the value of attribute propagated_errors.
6 7 8 |
# File 'lib/chanko/config.rb', line 6 def propagated_errors @propagated_errors end |
.proxy_method_name ⇒ Object
Returns the value of attribute proxy_method_name.
6 7 8 |
# File 'lib/chanko/config.rb', line 6 def proxy_method_name @proxy_method_name end |
.raise_error ⇒ Object
Returns the value of attribute raise_error.
6 7 8 |
# File 'lib/chanko/config.rb', line 6 def raise_error @raise_error end |
Class Method Details
.reset ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/chanko/config.rb', line 18 def reset self.auto_reload = Rails.env.development? || Rails.env.test? self.backtrace_limit = 10 self.compatible_css_class = false self.enable_logger = true self.propagated_errors = [] self.proxy_method_name = :unit self.raise_error = Rails.env.development? self.resolver = resolver_for_using_rails_and_env self.units_directory_path = "app/units" end |
.resolver_for_using_rails_and_env ⇒ Object
38 39 40 41 42 |
# File 'lib/chanko/config.rb', line 38 def resolver_for_using_rails_and_env return ActionView::FileSystemResolver if Rails::VERSION::MAJOR >= 7 return Chanko::Resolver::NoCacheFileSystemResolver if Rails.env.development? return ActionView::OptimizedFileSystemResolver end |
.units_directory_path ⇒ Object
34 35 36 |
# File 'lib/chanko/config.rb', line 34 def units_directory_path @resolved_units_directory_path ||= Rails.root.join(@units_directory_path).to_s end |
.units_directory_path=(path) ⇒ Object
30 31 32 |
# File 'lib/chanko/config.rb', line 30 def units_directory_path=(path) @units_directory_path = path end |