Sha256: dc45a12b797cccc3b042d527c90c35742bee49beabd8d09577c93cac206a7050

Contents?: true

Size: 445 Bytes

Versions: 24

Compression:

Stored size: 445 Bytes

Contents

<% module_namespacing do -%>
module <%= class_name %>Enum
<% if enum_members.any? -%>
<% enum_members.each_with_index do |member, index| -%>
  <%= member.name %> = <%= member.value || ((index + 1) * 10) %>
<% end -%>
<% else -%>
  # TODO: define constants for each member of the enumeration
<% end -%>

  # include the enumerated module
  include Riveter::Enumerated

  # NOTE: any constants defined here onwards will be ignored

end
<% end -%>

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
riveter-0.0.5 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.4 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.3 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.1 lib/generators/riveter/enum/templates/enum.rb