Class: DataMapper::Query::Direction

  • Object
    • DataMapper::Query::Direction

Attributes

Instance Attributes

direction [RW] public

Returns the value of attribute direction.

property [RW] public

Returns the value of attribute property.

Constructor Summary

private initialize(property, direction = :asc)
[View source]


23
24
25
26
27
28
29
# File 'dm-core/lib/dm-core/query.rb', line 23

def initialize(property, direction = :asc)
  raise ArgumentError, "+property+ is not a DataMapper::Property, but was #{property.class}", caller unless Property === property
  raise ArgumentError, "+direction+ is not a Symbol, but was #{direction.class}", caller             unless Symbol   === direction

  @property  = property
  @direction = direction
end

Public Visibility

Public Instance Method Summary

#==(other)
#inspect

Public Instance Methods Inherited from Object

validatable?

Public Instance Method Details

==

public ==(other)
[View source]


6
7
8
9
# File 'dm-core/lib/dm-core/query.rb', line 6

def ==(other)
  return true if super
  hash == other.hash
end

inspect

public inspect
[View source]


17
18
19
20
21
22
# File 'dm-core/lib/dm-core/query.rb', line 17

def inspect



  "#<#{self.class.name} #{@property.inspect} #{@direction}>"
end