Sha256: d5cf814f51f2b0e23a7ad4cab5c113ff8a051daa12aedd538c3af6090f8df48b
Contents?: true
Size: 736 Bytes
Versions: 19
Compression:
Stored size: 736 Bytes
Contents
# 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
Version data entries
19 entries across 19 versions & 1 rubygems