Module: Dependor::Sinatra::WithoutDependor
- Included in:
- Sinatra::Base
- Defined in:
- lib/dependor-sinatra/without_dependor.rb
Instance Method Summary collapse
- #dependor_disabled? ⇒ Boolean
- #disable_dependor ⇒ Object
- #enable_dependor ⇒ Object
- #without_dependor(&block) ⇒ Object
Instance Method Details
#dependor_disabled? ⇒ Boolean
12 13 14 |
# File 'lib/dependor-sinatra/without_dependor.rb', line 12 def dependor_disabled? @dependor_disabled end |
#disable_dependor ⇒ Object
4 5 6 |
# File 'lib/dependor-sinatra/without_dependor.rb', line 4 def disable_dependor @dependor_disabled = true end |
#enable_dependor ⇒ Object
8 9 10 |
# File 'lib/dependor-sinatra/without_dependor.rb', line 8 def enable_dependor @dependor_disabled = false end |
#without_dependor(&block) ⇒ Object
16 17 18 19 20 |
# File 'lib/dependor-sinatra/without_dependor.rb', line 16 def without_dependor(&block) disable_dependor block.call enable_dependor end |