class Snippr::Tardis

Public Class Methods

enabled() click to toggle source
# File lib/snippr/tardis.rb, line 11
def self.enabled
  @enabled_condition.call
end
enabled=(bool_or_block) click to toggle source
# File lib/snippr/tardis.rb, line 3
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