Sha256: d51bd09aa222dd8910e1d84c52fbd2561083f99ca3021beabad60f17e4fc2612

Contents?: true

Size: 265 Bytes

Versions: 11

Compression:

Stored size: 265 Bytes

Contents

require 'rubygems'
require 'iso_country_codes'

class TLD
  class Alpha3
    class << self
      def find(klass)
        tld = klass.tld
        return tld.match(/^\w\w$/) ? IsoCountryCodes.find(TLD::MAP[tld.to_sym] || tld).alpha3 : nil
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
tld-0.7.1 lib/tld/alpha3.rb
tld-0.7.0 lib/tld/alpha3.rb
alexrabarts-tld-0.2.0 lib/tld/alpha3.rb
alexrabarts-tld-0.2.1 lib/tld/alpha3.rb
alexrabarts-tld-0.4.0 lib/tld/alpha3.rb
alexrabarts-tld-0.5.0 lib/tld/alpha3.rb
alexrabarts-tld-0.6.0 lib/tld/alpha3.rb
tld-0.6.4 lib/tld/alpha3.rb
tld-0.6.3 lib/tld/alpha3.rb
tld-0.6.2 lib/tld/alpha3.rb
tld-0.6.1 lib/tld/alpha3.rb