Sha256: f336b12a10054d3294c5c2636131245f456ba7acf9fbb7c4dd2d1250b49d00b9

Contents?: true

Size: 534 Bytes

Versions: 58

Compression:

Stored size: 534 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

module TwitterCldr
  module Shared

    class Territory
      attr_reader :code

      def initialize(territory_code)
        @code = territory_code
      end

      def contains?(territory_code)
        TerritoriesContainment.contains?(code, territory_code)
      end

      def parents
        TerritoriesContainment.parents(code)
      end

      def children
        TerritoriesContainment.children(code)
      end

    end
  end
end

Version data entries

58 entries across 58 versions & 3 rubygems

Version Path
twitter_cldr-6.1.0 lib/twitter_cldr/shared/territory.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/twitter_cldr-4.4.5/lib/twitter_cldr/shared/territory.rb
twitter_cldr-6.0.2 lib/twitter_cldr/shared/territory.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/twitter_cldr-4.4.5/lib/twitter_cldr/shared/territory.rb
twitter_cldr-6.0.1 lib/twitter_cldr/shared/territory.rb
twitter_cldr-6.0.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-5.4.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-5.3.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-5.2.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-5.1.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-5.0.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-4.4.5 lib/twitter_cldr/shared/territory.rb
twitter_cldr-4.4.4 lib/twitter_cldr/shared/territory.rb
twitter_cldr-4.4.3 lib/twitter_cldr/shared/territory.rb
twitter_cldr-4.4.2 lib/twitter_cldr/shared/territory.rb
twitter_cldr-4.4.1 lib/twitter_cldr/shared/territory.rb
twitter_cldr-4.4.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-4.3.1 lib/twitter_cldr/shared/territory.rb
twitter_cldr-4.3.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-4.2.0 lib/twitter_cldr/shared/territory.rb