Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/world_flags/locale_helper.rb

Instance Method Summary collapse

Instance Method Details

#downcaseObject



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

def downcase
  self.map{|e| e.to_s.downcase}
end

#select_first_in(*list) ⇒ Object



12
13
14
15
# File 'lib/world_flags/locale_helper.rb', line 12

def select_first_in *list
  list = list.flatten.compact   
  self.each {|e| return e if list.include?(e) }
end

#upcaseObject



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

def upcase
  self.map{|e| e.to_s.upcase}
end