Class: SelfControl::Builder
- Inherits:
-
Object
- Object
- SelfControl::Builder
- Defined in:
- lib/self-control/builder.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
Returns the value of attribute actions.
-
#flows ⇒ Object
Returns the value of attribute flows.
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#state_column ⇒ Object
Returns the value of attribute state_column.
Instance Method Summary collapse
-
#initialize(klass, state_column = false, &block) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(klass, state_column = false, &block) ⇒ Builder
Returns a new instance of Builder.
5 6 7 8 9 10 11 |
# File 'lib/self-control/builder.rb', line 5 def initialize(klass, state_column=false, &block) @state_column = (state_column ? state_column.to_sym : false) @klass = klass @actions = {} @flows = {} instance_eval(&block) end |
Instance Attribute Details
#actions ⇒ Object
Returns the value of attribute actions.
3 4 5 |
# File 'lib/self-control/builder.rb', line 3 def actions @actions end |
#flows ⇒ Object
Returns the value of attribute flows.
3 4 5 |
# File 'lib/self-control/builder.rb', line 3 def flows @flows end |
#klass ⇒ Object
Returns the value of attribute klass.
3 4 5 |
# File 'lib/self-control/builder.rb', line 3 def klass @klass end |
#state_column ⇒ Object
Returns the value of attribute state_column.
3 4 5 |
# File 'lib/self-control/builder.rb', line 3 def state_column @state_column end |