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-4.1.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-4.0.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.6.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.5.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.4.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.3.0 lib/twitter_cldr/shared/territory.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/twitter_cldr-3.2.1/lib/twitter_cldr/shared/territory.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/twitter_cldr-3.2.1/lib/twitter_cldr/shared/territory.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/twitter_cldr-3.1.2/lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.2.1 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.2.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.1.2 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.1.1 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.1.0 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.0.10 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.0.9 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.0.8 lib/twitter_cldr/shared/territory.rb
twitter_cldr-3.0.7 lib/twitter_cldr/shared/territory.rb