Sha256: 0352d680aab7cc5a210dbadbdab11bd01d73f1bd0c258eb4e44113b8de657316

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

# -*- coding: utf-8 -*-

module DataMapper
  module Validate
    module Fixtures
      class BasketballPlayer
        #
        # Behaviors
        #

        include DataMapper::Resource

        #
        # Properties
        #

        property :id,     Serial

        without_auto_validations do
          property :name,   String
          property :height, Float
          property :weight, Float
        end

        #
        # Validations
        #

        # precision and scale need to be defined for length to be validated
        validates_is_number :height, :weight, :precision => 10
      end
    end # Fixtures
  end # Validate
end # DataMapper

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dm-validations-0.10.2 spec/fixtures/basketball_player.rb