Sha256: 73883ab398819a55afdfb18aa51523e45a12ce8f92d71ec9c57305f734ca8915
Contents?: true
Size: 770 Bytes
Versions: 4
Compression:
Stored size: 770 Bytes
Contents
# -*- coding: utf-8 -*- module DataMapper module Validation module Fixtures class MathematicalFunction # # Behaviors # include ::DataMapper::Resource # # Properties # property :id, Serial property :input, Float, :auto_validation => false property :output, Float, :auto_validation => false # # Validations # # function domain # don't ask me what function that is validates_within :input, :set => (1..n) # function range validates_within :output, :set => (-n..0), :message => "Negative values or zero only, please" end # MathematicalFunction end # Fixtures end # Validations end # DataMapper
Version data entries
4 entries across 4 versions & 2 rubygems