Sha256: ca65fa389e876ab28568fbb147f5f29aaaf1793e8f5b41a21131a743044f585d

Contents?: true

Size: 858 Bytes

Versions: 19

Compression:

Stored size: 858 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_date_range
  #   attr_time
  #   attr_boolean
  #   attr_enum
  #   attr_array
  #   attr_hash
  #   attr_model
  #
<% end -%>

  # optionally, define additional validations

end
<% end -%>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
riveter-0.8.3 lib/generators/riveter/command/templates/command.rb
riveter-0.8.2 lib/generators/riveter/command/templates/command.rb
riveter-0.8.1 lib/generators/riveter/command/templates/command.rb
riveter-0.8.0 lib/generators/riveter/command/templates/command.rb
riveter-0.7.0 lib/generators/riveter/command/templates/command.rb
riveter-0.6.0 lib/generators/riveter/command/templates/command.rb
riveter-0.3.0 lib/generators/riveter/command/templates/command.rb
riveter-0.2.1 lib/generators/riveter/command/templates/command.rb
riveter-0.2.0 lib/generators/riveter/command/templates/command.rb
riveter-0.1.1 lib/generators/riveter/command/templates/command.rb
riveter-0.0.15 lib/generators/riveter/command/templates/command.rb
riveter-0.0.14 lib/generators/riveter/command/templates/command.rb
riveter-0.0.13 lib/generators/riveter/command/templates/command.rb
riveter-0.0.12 lib/generators/riveter/command/templates/command.rb
riveter-0.0.11 lib/generators/riveter/command/templates/command.rb
riveter-0.0.10 lib/generators/riveter/command/templates/command.rb
riveter-0.0.9 lib/generators/riveter/command/templates/command.rb
riveter-0.0.8 lib/generators/riveter/command/templates/command.rb
riveter-0.0.7 lib/generators/riveter/command/templates/command.rb