Sha256: cbf82928ca7c821a70cd686285b40ddb01f57665658000db64a73462dc42ba05

Contents?: true

Size: 1.16 KB

Versions: 4

Compression:

Stored size: 1.16 KB

Contents

require 'mida_vocabulary/vocabulary'

module Mida
  module SchemaOrg

    autoload :Thing, 'mida_vocabulary/vocabularies/schemaorg/thing'
    autoload :ContactPoint, 'mida_vocabulary/vocabularies/schemaorg/contactpoint'
    autoload :Country, 'mida_vocabulary/vocabularies/schemaorg/country'

    # The mailing address.
    class PostalAddress < Mida::Vocabulary
      itemtype %r{http://schema.org/PostalAddress}i
      include_vocabulary Mida::SchemaOrg::Thing
      include_vocabulary Mida::SchemaOrg::ContactPoint

      # The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code.
      has_many 'addressCountry' do
        extract Mida::SchemaOrg::Country
        extract Mida::DataType::Text
      end

      # The locality. For example, Mountain View.
      has_many 'addressLocality'

      # The region. For example, CA.
      has_many 'addressRegion'

      # The post offce box number for PO box addresses.
      has_many 'postOfficeBoxNumber'

      # The postal code. For example, 94043.
      has_many 'postalCode'

      # The street address. For example, 1600 Amphitheatre Pkwy.
      has_many 'streetAddress'
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mida_vocabulary-0.1.3 lib/mida_vocabulary/vocabularies/schemaorg/postaladdress.rb
mida_vocabulary-0.1.2 lib/mida_vocabulary/vocabularies/schemaorg/postaladdress.rb
mida_vocabulary-0.1.1 lib/mida_vocabulary/vocabularies/schemaorg/postaladdress.rb
mida_vocabulary-0.1 lib/mida_vocabulary/vocabularies/schemaorg/postaladdress.rb