Sha256: 4e8f60c933327ddc435a02fe592f4c7c13ce120ae29234a335060b136e26b199
Contents?: true
Size: 322 Bytes
Versions: 9
Compression:
Stored size: 322 Bytes
Contents
class SimpleCommand < Mutations::Command required do string :name, :max_length => 10 string :email end optional do integer :amount end def validate unless email && email.include?('@') add_error(:email, :invalid, 'Email must contain @') end end def execute inputs end end
Version data entries
9 entries across 9 versions & 1 rubygems