Sha256: a2b7555d50f4bda4bba6581ca5b8b3ee8f6fe35f9600d0ea99c79c2a8a76eebf

Contents?: true

Size: 579 Bytes

Versions: 1

Compression:

Stored size: 579 Bytes

Contents

module Pupa
  # A geographic area whose geometry may change over time.
  class Area
    include Model

    self.schema = File.expand_path(File.join('..', '..', '..', 'schemas', 'popolo', 'area.json'), __dir__)

    include Concerns::Timestamps
    include Concerns::Sourceable

    attr_accessor :name, :identifier, :classification, :parent_id, :geometry
    dump          :name, :identifier, :classification, :parent_id, :geometry

    foreign_key :parent_id

    # Returns the area's name.
    #
    # @return [String] the area's name
    def to_s
      name
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pupa-0.2.4 lib/pupa/models/area.rb