Sha256: 4404683b7e6c9b3a593ca2ee0ef205703c09aed044140d1b6fd307c1aa367aa2

Contents?: true

Size: 836 Bytes

Versions: 5

Compression:

Stored size: 836 Bytes

Contents

<% module_namespacing do -%>
class <%= class_name %>Command < Riveter::Command::Base
<% if command_attributes.any? %>
<% command_attributes.each do |attribute| -%>
  attr_<%= attribute.type %> :<%= attribute.name %><%= attribute.inject_options %>
<% end -%>
<% else -%>

  #
  # define command attributes
  #
  # E.g.
  #
  #   attr_string :name[, options]
  #
  #   options include:
  #    :required => true|false  # default is false
  #    :default => 'a value'    # default is nil
  #    :validate => true|false  # default is true
  #
  #  supported attributes:
  #
  #   attr_string
  #   attr_text
  #   attr_integer
  #   attr_decimal
  #   attr_date
  #   attr_time
  #   attr_boolean
  #   attr_enum
  #   attr_array
  #   attr_hash
  #   attr_model
  #
<% end -%>

  # optionally, define additional validations

end
<% end -%>

Version data entries

5 entries across 5 versions & 1 rubygems

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