Class: ActiveState::Base
- Inherits:
-
Object
- Object
- ActiveState::Base
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/active_state/base.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#initialize(context) ⇒ Base
constructor
A new instance of Base.
- #state_name ⇒ Object
Constructor Details
#initialize(context) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/active_state/base.rb', line 7 def initialize(context) @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
5 6 7 |
# File 'lib/active_state/base.rb', line 5 def context @context end |
Instance Method Details
#state_name ⇒ Object
11 12 13 |
# File 'lib/active_state/base.rb', line 11 def state_name self.class.name.demodulize end |