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.8.3 lib/generators/riveter/enum/templates/enum.rb
riveter-0.8.2 lib/generators/riveter/enum/templates/enum.rb
riveter-0.8.1 lib/generators/riveter/enum/templates/enum.rb
riveter-0.8.0 lib/generators/riveter/enum/templates/enum.rb
riveter-0.7.0 lib/generators/riveter/enum/templates/enum.rb
riveter-0.6.0 lib/generators/riveter/enum/templates/enum.rb
riveter-0.3.0 lib/generators/riveter/enum/templates/enum.rb
riveter-0.2.1 lib/generators/riveter/enum/templates/enum.rb
riveter-0.2.0 lib/generators/riveter/enum/templates/enum.rb
riveter-0.1.1 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.15 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.14 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.13 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.12 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.11 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.10 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.9 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.8 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.7 lib/generators/riveter/enum/templates/enum.rb
riveter-0.0.6 lib/generators/riveter/enum/templates/enum.rb