Module: DataMapper::Matchers
- Defined in:
- lib/dm/matchers.rb,
lib/dm/matchers/have_one.rb,
lib/dm/matchers/belong_to.rb,
lib/dm/matchers/have_many.rb,
lib/dm/matchers/have_many_through.rb,
lib/dm/matchers/validate_format_of.rb,
lib/dm/matchers/validation_matcher.rb,
lib/dm/matchers/validate_presence_of.rb,
lib/dm/matchers/validate_uniqueness_of.rb,
lib/dm/matchers/have_many_and_belong_to.rb
Defined Under Namespace
Classes: BelongTo, HaveMany, HaveManyAndBelongTo, HaveManyThrough, HaveOne, ValidateFormatOf, ValidatePresenceOf, ValidateUniquenessOf, ValidationMatcher
Instance Method Summary
collapse
Instance Method Details
#belong_to(name) ⇒ Object
32
33
34
|
# File 'lib/dm/matchers/belong_to.rb', line 32
def belong_to(name)
BelongTo.new(name)
end
|
#have_many(name) ⇒ Object
38
39
40
|
# File 'lib/dm/matchers/have_many.rb', line 38
def have_many(name)
HaveMany.new(name)
end
|
#have_many_and_belong_to(name) ⇒ Object
29
30
31
|
# File 'lib/dm/matchers/have_many_and_belong_to.rb', line 29
def have_many_and_belong_to(name)
HaveManyAndBelongTo.new(name)
end
|
#have_one(name) ⇒ Object
30
31
32
|
# File 'lib/dm/matchers/have_one.rb', line 30
def have_one(name)
HaveOne.new(name)
end
|
3
4
5
|
# File 'lib/dm/matchers/validate_format_of.rb', line 3
def validate_format_of(property)
ValidateFormatOf.new(property)
end
|
#validate_presence_of(property) ⇒ Object
3
4
5
|
# File 'lib/dm/matchers/validate_presence_of.rb', line 3
def validate_presence_of(property)
ValidatePresenceOf.new(property)
end
|
#validate_uniqueness_of(property) ⇒ Object
3
4
5
|
# File 'lib/dm/matchers/validate_uniqueness_of.rb', line 3
def validate_uniqueness_of(property)
ValidateUniquenessOf.new(property)
end
|