Module: RailsOnboarding::Configuration::Templates
- Included in:
- RailsOnboarding::Configuration
- Defined in:
- lib/rails_onboarding/configuration/templates.rb
Overview
Pre-built onboarding step templates for common app types.
Instance Attribute Summary collapse
-
#onboarding_templates ⇒ Object
Returns the value of attribute onboarding_templates.
Instance Method Summary collapse
-
#apply_template(template_key) ⇒ Boolean
Apply a template to the current configuration.
-
#template(template_key) ⇒ Hash?
Get an onboarding template by key.
Instance Attribute Details
#onboarding_templates ⇒ Object
Returns the value of attribute onboarding_templates.
5 6 7 |
# File 'lib/rails_onboarding/configuration/templates.rb', line 5 def onboarding_templates @onboarding_templates end |
Instance Method Details
#apply_template(template_key) ⇒ Boolean
Apply a template to the current configuration
19 20 21 22 23 24 25 |
# File 'lib/rails_onboarding/configuration/templates.rb', line 19 def apply_template(template_key) template = onboarding_templates[template_key.to_sym] return false unless template @steps = template[:steps] true end |
#template(template_key) ⇒ Hash?
Get an onboarding template by key
11 12 13 |
# File 'lib/rails_onboarding/configuration/templates.rb', line 11 def template(template_key) onboarding_templates[template_key.to_sym] end |