Class: Snippr::Tardis
- Inherits:
-
Object
- Object
- Snippr::Tardis
- Defined in:
- lib/snippr/tardis.rb
Class Method Summary collapse
Class Method Details
.enabled ⇒ Object
12 13 14 |
# File 'lib/snippr/tardis.rb', line 12 def self.enabled @enabled_condition.call end |
.enabled=(bool_or_block) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/snippr/tardis.rb', line 4 def self.enabled=(bool_or_block) if bool_or_block.kind_of?(Proc) @enabled_condition = bool_or_block else @enabled_condition = -> { !!bool_or_block } end end |