Sha256: b57c7dd7c01d3ae80546530f01ba62c30f3bf70591c17f660432fb1672f81cb1

Contents?: true

Size: 214 Bytes

Versions: 2

Compression:

Stored size: 214 Bytes

Contents

class <%= class_name %> < ClassyEnum::Base
  enum_classes <%= values.map {|a| ":#{a}"}.join(", ") %>
end
<% values.each do |arg| %>
class <%= "#{class_name}::#{arg.camelize}" %> < <%= class_name %>
end
<%- end -%>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
classy_enum-2.3.0 lib/generators/classy_enum/templates/enum.rb
classy_enum-2.2.0 lib/generators/classy_enum/templates/enum.rb