Module: Knitkit::Config
- Defined in:
- lib/knitkit/config.rb
Class Attribute Summary collapse
-
.ignored_prefix_paths ⇒ Object
Returns the value of attribute ignored_prefix_paths.
-
.images_base_path ⇒ Object
Returns the value of attribute images_base_path.
-
.unauthorized_url ⇒ Object
Returns the value of attribute unauthorized_url.
Class Method Summary collapse
Class Attribute Details
.ignored_prefix_paths ⇒ Object
Returns the value of attribute ignored_prefix_paths.
4 5 6 |
# File 'lib/knitkit/config.rb', line 4 def ignored_prefix_paths @ignored_prefix_paths end |
.images_base_path ⇒ Object
Returns the value of attribute images_base_path.
4 5 6 |
# File 'lib/knitkit/config.rb', line 4 def images_base_path @images_base_path end |
.unauthorized_url ⇒ Object
Returns the value of attribute unauthorized_url.
4 5 6 |
# File 'lib/knitkit/config.rb', line 4 def @unauthorized_url end |
Class Method Details
.configure(&blk) ⇒ Object
20 21 22 |
# File 'lib/knitkit/config.rb', line 20 def configure(&blk) @configure_blk = blk end |
.configure! ⇒ Object
24 25 26 |
# File 'lib/knitkit/config.rb', line 24 def configure! @configure_blk.call(self) if @configure_blk end |
.init! ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/knitkit/config.rb', line 6 def init! @defaults = { :@unauthorized_url => '/unauthorized', :@ignored_prefix_paths => [], :@images_base_path => File.join("public", "knitkit") } end |
.reset! ⇒ Object
14 15 16 17 18 |
# File 'lib/knitkit/config.rb', line 14 def reset! @defaults.each do |k,v| instance_variable_set(k,v) end end |