Class: Array

Inherits:
Object show all
Defined in:
lib/other.rb

Direct Known Subclasses

OrientSupport::Array

Instance Method Summary collapse

Instance Method Details

#analyseObject

used to enable def abc *key where key is a Range, an comma separated List or an item aimed to support #compose_where



23
24
25
26
27
28
29
30
31
32
# File 'lib/other.rb', line 23

def analyse # :nodoc:
  if first.is_a?(Range) 
   first
  elsif size ==1
    first
  else
    self
  end

end

#from_orientObject



12
13
14
# File 'lib/other.rb', line 12

def from_orient
  map &:from_orient
end

#to_humanObject



16
17
18
# File 'lib/other.rb', line 16

def to_human
	map &:to_human
end

#to_orObject



8
9
10
# File 'lib/other.rb', line 8

def to_or
  "["+ map( &:to_or).join(', ')+"]"
end

#to_orientObject

Class extentions to manage to_orient and from_orient



4
5
6
# File 'lib/other.rb', line 4

def to_orient
  map( &:to_orient) # .join(',')
end