# TODO: describe the policy, its subject and context class <%= klass %> < Tram::Policy # TODO: add default values (default: -> { ... }), # coercers (type: proc(&:to_s)), # and optional arguments (optional: true) # when necessary <% parsed_params.each do |param| -%> param :<%= param %> <% end -%> <% parsed_options.each do |option| -%> option :<%= option %> <% end -%> <% parsed_validators.each do |validator| -%> validate :<%= validator[:name] %> <% end -%> private <% parsed_validators.each do |validator| %> def <%= validator[:name] %> # TODO: define a condition return if true # TODO: add necessary tags errors.add :<%= validator[:key] %> end <% end -%> end