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

Version Path
horse_power-1.0.0 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.9.0 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.8.5 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.8.3 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.8.2 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.8.1 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.8.0 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.7.1 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.7.0 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.6.5 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.6.0 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.5.0 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.4.1 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.4.0 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.3.3 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.3.2 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.2.1 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.2.0 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.1.6 lib/generators/horse_power/serializer/serializer_generator.rb
horse_power-0.1.5 lib/generators/horse_power/serializer/serializer_generator.rb