Sha256: 3f0469168773dde81490cdbaa092ffdb2a92ed073a969c0c9fc215f8938b6ef3
Contents?: true
Size: 454 Bytes
Versions: 3
Compression:
Stored size: 454 Bytes
Contents
module Rails class UtilGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) argument :attributes, type: :array, default: [], banner: 'method method' desc 'This generator creates a new util at app/utils' def create_util template('util.rb', "app/utils/#{file_name.underscore}_util.rb") template('util_spec.rb', "spec/utils/#{file_name.underscore}_util_spec.rb") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
power-types-0.7.0 | lib/generators/rails/util_generator.rb |
power-types-0.6.0 | lib/generators/rails/util_generator.rb |
power-types-0.5.0 | lib/generators/rails/util_generator.rb |