Class: Array

Inherits:
Object show all
Defined in:
lib/qooxview/entity.rb,
lib/qooxview/additions.rb

Instance Method Summary collapse

Instance Method Details

#sortkObject



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

def sortk
  sort { |a, b| a.to_s <=> b.to_s }
end

#to_frontend(arg = nil) ⇒ Object



23
24
25
26
# File 'lib/qooxview/additions.rb', line 23

def to_frontend(arg = nil)
  collect { |a| a.to_frontend(arg) }.compact.reject{|e| e[1] == nil}.
    sort { |a, b| a[1]<=>b[1] }
end

#to_hObject



10
11
12
# File 'lib/qooxview/additions.rb', line 10

def to_h
  Hash[*self.flatten(1)]
end

#to_sObject



28
29
30
# File 'lib/qooxview/additions.rb', line 28

def to_s
  "[#{join(',')}]"
end

#to_symObject



15
16
17
# File 'lib/qooxview/additions.rb', line 15

def to_sym
  collect { |v| v.to_sym }
end

#to_sym!Object



19
20
21
# File 'lib/qooxview/additions.rb', line 19

def to_sym!
  self.replace(to_sym())
end