Sha256: 4b1e575db84b9d008a2b3bac94d73cf1e526424aee848fd3ea0fd0b1a980d956

Contents?: true

Size: 1.12 KB

Versions: 6

Compression:

Stored size: 1.12 KB

Contents

require 'mida/vocabulary'

module Mida
  module SchemaOrg

    autoload :Thing, 'mida/vocabularies/schemaorg/thing'
    autoload :ContactPoint, 'mida/vocabularies/schemaorg/contactpoint'
    autoload :Country, 'mida/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

6 entries across 6 versions & 1 rubygems

Version Path
mida-0.4.0 lib/mida/vocabularies/schemaorg/postaladdress.rb
mida-0.3.9 lib/mida/vocabularies/schemaorg/postaladdress.rb
mida-0.3.8 lib/mida/vocabularies/schemaorg/postaladdress.rb
mida-0.3.7 lib/mida/vocabularies/schemaorg/postaladdress.rb
mida-0.3.6 lib/mida/vocabularies/schemaorg/postaladdress.rb
mida-0.3.3 lib/mida/vocabularies/schemaorg/postaladdress.rb