Sha256: ab76544248ef7697042db7d71f9c09f6f0b27717ccbac4e1960871138188c6e1

Contents?: true

Size: 350 Bytes

Versions: 1

Compression:

Stored size: 350 Bytes

Contents

require 'frozen_record'

class CountryData::Data < FrozenRecord::Base
    self.base_path = 'lib'

    def self.find(arg)
        arg = arg.to_s.upcase if arg.class == Symbol
        where(alpha2: arg)
    end

    def self.find_by_official_language(arg)
        all.select { |c| c if c.languages_official.include? arg.to_s }
    end

    private

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
country_data-0.1.0 lib/country_data/data.rb