diff options
Diffstat (limited to 'railties/lib/generator/generators/metal/metal_generator.rb')
-rw-r--r-- | railties/lib/generator/generators/metal/metal_generator.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/lib/generator/generators/metal/metal_generator.rb b/railties/lib/generator/generators/metal/metal_generator.rb new file mode 100644 index 0000000000..1c59a4e90a --- /dev/null +++ b/railties/lib/generator/generators/metal/metal_generator.rb @@ -0,0 +1,17 @@ +require File.dirname(__FILE__) + '/../../base' + +module Rails::Generators + class MetalGenerator < Base + argument :file_name, :type => :string + + def create_file + template "metal.rb", "app/metal/#{file_name}.rb" + end + + protected + + def class_name + file_name.classify + end + end +end |