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.
-
.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 |
.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
19 20 21 |
# File 'lib/knitkit/config.rb', line 19 def configure(&blk) @configure_blk = blk end |
.configure! ⇒ Object
23 24 25 |
# File 'lib/knitkit/config.rb', line 23 def configure! @configure_blk.call(self) if @configure_blk end |
.init! ⇒ Object
6 7 8 9 10 11 |
# File 'lib/knitkit/config.rb', line 6 def init! @defaults = { :@unauthorized_url => '/unauthorized', :@ignored_prefix_paths => [] } end |
.reset! ⇒ Object
13 14 15 16 17 |
# File 'lib/knitkit/config.rb', line 13 def reset! @defaults.each do |k,v| instance_variable_set(k,v) end end |