Module: Stator::Model::TrackerMethods
- Defined in:
- lib/stator/model.rb
Class Method Summary collapse
Instance Method Summary collapse
- #in_state_at?(state, t, namespace = '') ⇒ Boolean
- #likely_state_at(t, namespace = '') ⇒ Object
- #state_by?(state, t, namespace = '') ⇒ Boolean
Class Method Details
.included(base) ⇒ Object
36 37 38 39 40 |
# File 'lib/stator/model.rb', line 36 def self.included(base) base.class_eval do before_save :_stator_maybe_track_transition, prepend: true end end |
Instance Method Details
#in_state_at?(state, t, namespace = '') ⇒ Boolean
42 43 44 |
# File 'lib/stator/model.rb', line 42 def in_state_at?(state, t, namespace = '') _integration(namespace).in_state_at?(state, t) end |
#likely_state_at(t, namespace = '') ⇒ Object
46 47 48 |
# File 'lib/stator/model.rb', line 46 def likely_state_at(t, namespace = '') _integration(namespace).likely_state_at(t) end |
#state_by?(state, t, namespace = '') ⇒ Boolean
50 51 52 |
# File 'lib/stator/model.rb', line 50 def state_by?(state, t, namespace = '') _integration(namespace).state_by?(state, t) end |