Module: CanTango::Permit::Helper::State

Included in:
Execution
Defined in:
lib/cantango/permit/helper/state.rb

Instance Method Summary collapse

Instance Method Details

#disable!Object



4
5
6
# File 'lib/cantango/permit/helper/state.rb', line 4

def disable!
  @enabled = false
end

#disabled?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/cantango/permit/helper/state.rb', line 8

def disabled?
  !enabled?
end

#enable!Object



12
13
14
# File 'lib/cantango/permit/helper/state.rb', line 12

def enable!
  @enabled = true
end

#enabled?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/cantango/permit/helper/state.rb', line 16

def enabled?
  @enabled == true
end