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.6.6 lib/world_flags/core_ext.rb
world-flags-0.6.5 lib/world_flags/core_ext.rb
world-flags-0.6.4 lib/world_flags/core_ext.rb
world-flags-0.6.3.1 lib/world_flags/core_ext.rb
world-flags-0.6.3 lib/world_flags/core_ext.rb
world-flags-0.6.2.1 lib/world_flags/core_ext.rb
world-flags-0.6.2 lib/world_flags/core_ext.rb
world-flags-0.6.1.1 lib/world_flags/core_ext.rb
world-flags-0.6.1 lib/world_flags/core_ext.rb
world-flags-0.6.0 lib/world_flags/core_ext.rb
world-flags-0.5.1 lib/world_flags/core_ext.rb
world-flags-0.5.0 lib/world_flags/core_ext.rb
world-flags-0.4.9 lib/world_flags/core_ext.rb
world-flags-0.4.8.3 lib/world_flags/core_ext.rb
world-flags-0.4.8.2 lib/world_flags/core_ext.rb
world-flags-0.4.7 lib/world_flags/core_ext.rb
world-flags-0.4.5 lib/world_flags/core_ext.rb
world-flags-0.4.4 lib/world_flags/core_ext.rb
world-flags-0.4.3 lib/world_flags/core_ext.rb
world-flags-0.4.2 lib/world_flags/core_ext.rb