Sha256: 9ac4cd8c188d813227ed5069c92d1b5ff5b62c22334fe2b7525b3bd887f73ea3
Contents?: true
Size: 568 Bytes
Versions: 3
Compression:
Stored size: 568 Bytes
Contents
module Controll module Generators class ExecutorGenerator < ::Rails::Generators::NamedBase desc 'Generates an Executor' class_option :type, default: 'base', desc: 'The type of executor' def main_flow template 'executor.tt', "app/controll/executors/#{file_name}.rb" end protected def parent_class name.include?('::') ? "::Controll::Executor::#{parent_class_name}" : parent_class_name end def parent_class_name (options[:type] || 'base').camelize end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
controll-0.3.2 | lib/generators/controll/executor_generator.rb |
controll-0.3.1 | lib/generators/controll/executor_generator.rb |
controll-0.3.0 | lib/generators/controll/executor_generator.rb |