Sha256: b0ba347af8374cc8127d701e9f679ad1b1199b834cf62dbe0bbc47b45f3aff03

Contents?: true

Size: 950 Bytes

Versions: 1

Compression:

Stored size: 950 Bytes

Contents

# encoding: utf-8
<% tabs = 0 -%>
<% policy.namespaces.each do |item| -%>

<%= "  " * tabs %>module <%= item %>
<% tabs += 1 -%>
<% end -%>

<%= "  " * tabs %># Implements the following policy (invariant):
<%= "  " * tabs %>#
<%= "  " * tabs %># @todo: describe the policy
<%= "  " * tabs %>#
<%= "  " * tabs %># @example
<%= "  " * tabs %>#   <%= policy.type %>.new(<%= attributes.join(", ") %>)
<%= "  " * tabs %>#
<% attributes.each do |item| -%>
<%= "  " * tabs %># @param [@todo] <%= item %>
<%= "  " * tabs %>#   @todo: describe the attribute
<% end -%>
<%= "  " * tabs %>class <%= policy.const %> < Hexx::Policy.new(<%= attributes.map { |item| ":#{ item }" }.join(", ") %>)

<%= "  " * tabs %>  # Define necessary validations using `validates` or `validate` declarations.

<%= "  " * tabs %>end # class <%= policy.const %>
<% policy.namespaces.reverse.each do |item| -%>

<% tabs -= 1 -%>
<%= "  " * tabs %>end # module <%= item %>
<% end -%>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
policy-1.1.0 lib/policy/cli/policy.erb