Class: Socrates::SampleStates::StateFactory
- Inherits:
-
Object
- Object
- Socrates::SampleStates::StateFactory
- Defined in:
- lib/socrates/sample_states.rb
Instance Method Summary collapse
Instance Method Details
#build(state_data:, adapter:, session:) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/socrates/sample_states.rb', line 17 def build(state_data:, adapter:, session:) classname = StringHelpers.underscore_to_classname(state_data.state_id) Object.const_get("Socrates::SampleStates::#{classname}") .new(data: state_data, adapter: adapter, session: session) end |
#default ⇒ Object
9 10 11 |
# File 'lib/socrates/sample_states.rb', line 9 def default :get_started end |
#expired ⇒ Object
13 14 15 |
# File 'lib/socrates/sample_states.rb', line 13 def expired(*) :expired end |