Sha256: 58bce5ea8ddcdc2c975626c03bba48aec44e1c618660c5822d74e3391053fa57
Contents?: true
Size: 488 Bytes
Versions: 24
Compression:
Stored size: 488 Bytes
Contents
module HorsePower class SerializerGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :resource_name, :type => :string argument :api_version, :type => :string, :default => "1" argument :attributes, type: :array, default: [], banner: "field:type field:type" def sprint template "serializer.rb.erb", "app/serializers/v#{api_version}/#{HorsePower.get_singular(resource_name)}_serializer.rb" end private end end
Version data entries
24 entries across 24 versions & 1 rubygems