Class: Toolchest::Generators::ToolboxGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Toolchest::Generators::ToolboxGenerator
- Defined in:
- lib/generators/toolchest/toolbox_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_spec ⇒ Object
26 |
# File 'lib/generators/toolchest/toolbox_generator.rb', line 26 def create_spec = template "toolbox_spec.rb.tt", "spec/toolboxes/#{file_path}_toolbox_spec.rb" |
#create_toolbox ⇒ Object
12 |
# File 'lib/generators/toolchest/toolbox_generator.rb', line 12 def create_toolbox = template "toolbox.rb.tt", "app/toolboxes/#{file_path}_toolbox.rb" |
#create_views ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/generators/toolchest/toolbox_generator.rb', line 14 def create_views return if actions.empty? actions.each do |action| create_file "app/views/toolboxes/#{file_path}/#{action}.json.jb", <<~JB { # TODO: return data for #{toolbox_name.underscore}##{action} } JB end end |