Sha256: 187be2f143e594b13a4bacd9a3ec480647c57e2d09bc4be33303d179ac388cf4

Contents?: true

Size: 332 Bytes

Versions: 31

Compression:

Stored size: 332 Bytes

Contents

class Hash
  def hash_revert
    r = Hash.new
    each {|k,v| r[v] = k}
    r
  end
end

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

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

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

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
world-flags-0.4.1 lib/world_flags/core_ext.rb
world-flags-0.4.0 lib/world_flags/core_ext.rb
world-flags-0.3.6 lib/world_flags/core_ext.rb
world-flags-0.3.5 lib/world_flags/core_ext.rb
world-flags-0.3.4 lib/world_flags/core_ext.rb
world-flags-0.3.2.2 lib/world_flags/core_ext.rb
world-flags-0.3.2.1 lib/world_flags/core_ext.rb
world-flags-0.3.2 lib/world_flags/core_ext.rb
world-flags-0.3.1 lib/world_flags/core_ext.rb
world-flags-0.3.0 lib/world_flags/core_ext.rb
world-flags-0.2.7 lib/world_flags/core_ext.rb