Class: TypedOperationGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- TypedOperationGenerator
- Defined in:
- lib/generators/typed_operation_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_operation ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/generators/typed_operation_generator.rb', line 10 def generate_operation template( File.join(self.class.source_root, "operation.rb"), File.join([:path], "#{file_name}.rb") ) template( File.join(self.class.source_root, "operation_test.rb"), File.join("test/", [:path].gsub(/\Aapp\//, ""), "#{file_name}_test.rb") ) end |