Sha256: f6ca1a70c4623f608d1303db417327c8f654f0d3a2cb330dea764ebf8832b10a

Contents?: true

Size: 366 Bytes

Versions: 8

Compression:

Stored size: 366 Bytes

Contents

module DataMapper
  module Validations
    module Fixtures
      class LlamaSpaceship
        include DataMapper::Resource

        property :id, Serial
        property :type, String
        property :color, String

        validates_format_of :color, :with => /^red|black$/, :if => Proc.new { |spaceship| spaceship.type == "standard" }
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
sbf-dm-validations-1.4.0 spec/fixtures/llama_spaceship.rb
sbf-dm-validations-1.3.0 spec/fixtures/llama_spaceship.rb
sbf-dm-validations-1.3.0.beta spec/fixtures/llama_spaceship.rb
ardm-validations-1.2.0 spec/fixtures/llama_spaceship.rb
aequitas-0.0.1 spec_legacy/fixtures/llama_spaceship.rb
dm-validations-1.2.0 spec/fixtures/llama_spaceship.rb
dm-validations-1.2.0.rc2 spec/fixtures/llama_spaceship.rb
dm-validations-1.2.0.rc1 spec/fixtures/llama_spaceship.rb