Module: SelfControl::ClassMethods

Defined in:
lib/self-control.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#selfcontrol_builderObject (readonly)

Returns the value of attribute selfcontrol_builder.



8
9
10
# File 'lib/self-control.rb', line 8

def selfcontrol_builder
  @selfcontrol_builder
end

Instance Method Details

#selfcontrol(options = {}, &block) ⇒ Object Also known as: flowcontrol



10
11
12
13
# File 'lib/self-control.rb', line 10

def selfcontrol(options={}, &block)
  state_column = options.delete(:for)
  @selfcontrol_builder = SelfControl::Builder.new(self, state_column, &block)
end