Module: Primer::Enabler

Included in:
Watcher
Defined in:
lib/primer/enabler.rb

Instance Method Summary collapse

Instance Method Details

#disable!Object



8
9
10
11
# File 'lib/primer/enabler.rb', line 8

def disable!
  @enabled = false
  on_disable
end

#enable!Object



3
4
5
6
# File 'lib/primer/enabler.rb', line 3

def enable!
  @enabled = true
  on_enable
end

#enabled?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/primer/enabler.rb', line 13

def enabled?
  !!@enabled
end