Class: Memento::Action::Base
- Inherits:
-
Object
- Object
- Memento::Action::Base
- Defined in:
- lib/memento/action.rb
Instance Attribute Summary collapse
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Class Method Summary collapse
Instance Method Summary collapse
- #fetch? ⇒ Boolean
-
#initialize(state) ⇒ Base
constructor
A new instance of Base.
- #record ⇒ Object
- #record_data ⇒ Object
Constructor Details
#initialize(state) ⇒ Base
Returns a new instance of Base.
5 6 7 |
# File 'lib/memento/action.rb', line 5 def initialize(state) @state = state end |
Instance Attribute Details
#state ⇒ Object (readonly)
Returns the value of attribute state.
9 10 11 |
# File 'lib/memento/action.rb', line 9 def state @state end |
Class Method Details
.inherited(child) ⇒ Object
25 26 27 |
# File 'lib/memento/action.rb', line 25 def self.inherited(child) self.action_types << child.name.demodulize.underscore end |
Instance Method Details
#fetch? ⇒ Boolean
21 22 23 |
# File 'lib/memento/action.rb', line 21 def fetch? true end |
#record ⇒ Object
13 14 15 |
# File 'lib/memento/action.rb', line 13 def record @state.record end |
#record_data ⇒ Object
17 18 19 |
# File 'lib/memento/action.rb', line 17 def record_data @state.record_data end |