Sha256: d4ac19a3282d9f0e9259182ab7543844a8090db56183ac8496ed9ea0c5b8934c

Contents?: true

Size: 199 Bytes

Versions: 5

Compression:

Stored size: 199 Bytes

Contents

module ZendeskAppsTools
  class LocaleIdentifier
    attr_reader :language_id

    # Convert :"en-US-x-12" to 'en'
    def initialize(code)
      @language_id = code.sub(/-.*/, '')
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
zendesk_apps_tools-1.4.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.3.0 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.2.2 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.2.1 lib/zendesk_apps_tools/locale_identifier.rb
zendesk_apps_tools-1.1.3 lib/zendesk_apps_tools/locale_identifier.rb