Class: EtnaApp::CreateTemplate::AttributeActions

Inherits:
Etna::Command show all
Defined in:
lib/commands.rb

Overview

TODO: Refactor and replace with a command workflow similar to AddProjectModels

Instance Attribute Summary

Attributes inherited from Etna::Command

#parent

Instance Method Summary collapse

Methods inherited from Etna::Command

#completions, #fill_in_missing_params, #find_command, #initialize, parent_scope, #setup

Methods included from Etna::CommandOrExecutor

#command_name, #completions_for, #desc, #flag_argspec, #flag_as_parameter, included, #parse_flags, #program_name, #usage

Constructor Details

This class inherits a constructor from Etna::Command

Instance Method Details

#executeObject



81
82
83
84
85
86
87
88
# File 'lib/commands.rb', line 81

def execute
  spec = Gem::Specification.find_by_name("etna")
  gem_root = spec.gem_dir
  FileUtils.cp(
      "#{gem_root}/lib/etna/templates/attribute_actions_template.json",
      'attribute_actions_template.json')
  puts "A sample attribute actions JSON template has been provided in the current directory as `attribute_actions_template.json`."
end