Included Modules

Class Index [+]

Quicksearch

DataMapper::Query::Conditions::OrOperation

Public Instance Methods

matches?(record) click to toggle source

Match the record

@param [Resource, Hash] record

  the resource to match

@return [true]

  true if the record matches, false if not

@api semipublic

     # File lib/dm-core/query/conditions/operation.rb, line 497
497:         def matches?(record)
498:           any? { |op| op.respond_to?(:matches?) ? op.matches?(record) : true }
499:         end
minimize() click to toggle source

Minimize the operation

@return [self]

  the minimized OrOperation

@return [AbstractOperation, AbstractComparison, Array]

  the minimized operation

@api semipublic

     # File lib/dm-core/query/conditions/operation.rb, line 521
521:         def minimize
522:           minimize_operands
523: 
524:           return Operation.new(:null) if any? { |op| op.nil? }
525: 
526:           prune_operands
527: 
528:           one? ? first : self
529:         end
valid?() click to toggle source

Test if the operation is valid

An OrOperation is valid if one of it’s operands is valid.

@return [Boolean]

  true if the operation is valid, false if not

@api semipublic

     # File lib/dm-core/query/conditions/operation.rb, line 509
509:         def valid?
510:           any? { |op| valid_operand?(op) }
511:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.