Sha256: 764fedd7b102a02fe87b9e86557e9b87a85b09d5b63f6257bd9a236c80d43ea6
Contents?: true
Size: 765 Bytes
Versions: 3
Compression:
Stored size: 765 Bytes
Contents
# -*- coding: utf-8 -*- module DataMapper module Validate 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 # Validate end # DataMapper
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dm-validations-0.10.2 | spec/fixtures/mathematical_function.rb |
dm-validations-0.10.1 | spec/fixtures/mathematical_function.rb |
dm-validations-0.10.0 | spec/fixtures/mathematical_function.rb |