Module: Charming::Generators::AppGenerator::StateTemplates

Included in:
Charming::Generators::AppGenerator
Defined in:
lib/charming/generators/app_generator/state_templates.rb

Instance Method Summary collapse

Instance Method Details

#application_stateObject



7
8
9
10
11
12
13
14
15
# File 'lib/charming/generators/app_generator/state_templates.rb', line 7

def application_state
  %(# frozen_string_literal: true

module #{name.class_name}
  class ApplicationState < Charming::ApplicationState
  end
end
)
end

#home_stateObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/charming/generators/app_generator/state_templates.rb', line 17

def home_state
  %(# frozen_string_literal: true

module #{name.class_name}
  class HomeState < ApplicationState
    attribute :title, :string, default: "#{name.class_name}"
  end
end
)
end