Class: Strum::Commands::Resource::Route
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Strum::Commands::Resource::Route
- Includes:
- Mixin::AppCheck, Mixin::Fields, Mixin::Names, Thor::Actions
- Defined in:
- lib/strum/commands/resource/route.rb
Overview
Strum generate sub command ‘strum generate migration`
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
19 20 21 |
# File 'lib/strum/commands/resource/route.rb', line 19 def self.source_root File.("../../templates", __dir__) end |
Instance Method Details
#create_route_file ⇒ Object
27 28 29 |
# File 'lib/strum/commands/resource/route.rb', line 27 def create_route_file [:crud] ? crud_route : basic_route end |
#pre_check ⇒ Object
23 24 25 |
# File 'lib/strum/commands/resource/route.rb', line 23 def pre_check raise StrumGenerateError, "This is not Strum application" unless strum? end |