Sha256: 1439061e9f09288c40f9c826239cd5c30f8fa4eceaa944f3d4531e0f66162b37

Contents?: true

Size: 526 Bytes

Versions: 65

Compression:

Stored size: 526 Bytes

Contents

require "cfoundry/v2/model"

module CFoundry::V2
  class Domain < Model
    validates_presence_of :name
    validates_format_of :name, :with => /\A([^\.]+\.)+[^\.]+\Z/
    validates_presence_of :owning_organization

    attribute :name, :string
    attribute :wildcard, :boolean
    to_one    :owning_organization, :as => :organization, :default => nil
    to_many   :spaces

    queryable_by :name, :owning_organization_guid, :space_guid

    def system?
      guid.present? && !owning_organization.present?
    end
  end
end

Version data entries

65 entries across 65 versions & 3 rubygems

Version Path
new_cfoundry-4.9.4 lib/cfoundry/v2/domain.rb
new_cfoundry-4.9.3 lib/cfoundry/v2/domain.rb
ncfoundry-4.9.4 lib/cfoundry/v2/domain.rb
ncfoundry-4.9.3 lib/cfoundry/v2/domain.rb
ncfoundry-4.9.2 lib/cfoundry/v2/domain.rb
new_cfoundry-4.9.2 lib/cfoundry/v2/domain.rb
new_cfoundry-4.9.1 lib/cfoundry/v2/domain.rb
new_cfoundry-4.9.0 lib/cfoundry/v2/domain.rb
new_cfoundry-4.8.3 lib/cfoundry/v2/domain.rb
new_cfoundry-4.8.2 lib/cfoundry/v2/domain.rb
cfoundry-4.7.2.rc1 lib/cfoundry/v2/domain.rb
cfoundry-4.7.1 lib/cfoundry/v2/domain.rb
cfoundry-4.7.1.rc1 lib/cfoundry/v2/domain.rb
cfoundry-4.7.0 lib/cfoundry/v2/domain.rb
cfoundry-4.6.3.rc3 lib/cfoundry/v2/domain.rb
cfoundry-4.6.3.rc2 lib/cfoundry/v2/domain.rb
cfoundry-4.6.3.rc1 lib/cfoundry/v2/domain.rb
cfoundry-4.6.2 lib/cfoundry/v2/domain.rb
cfoundry-4.6.1 lib/cfoundry/v2/domain.rb
cfoundry-4.6.0 lib/cfoundry/v2/domain.rb