Class: Array
- Defined in:
- lib/qooxview/entity.rb,
lib/qooxview/additions.rb
Instance Method Summary collapse
- #sortk ⇒ Object
- #to_frontend(arg = nil) ⇒ Object
- #to_h ⇒ Object
- #to_s ⇒ Object
- #to_sym ⇒ Object
- #to_sym! ⇒ Object
Instance Method Details
#sortk ⇒ Object
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_h ⇒ Object
10 11 12 |
# File 'lib/qooxview/additions.rb', line 10 def to_h Hash[*self.flatten(1)] end |
#to_s ⇒ Object
28 29 30 |
# File 'lib/qooxview/additions.rb', line 28 def to_s "[#{join(',')}]" end |
#to_sym ⇒ Object
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 |