Sha256: 2b2a9e541bb81153195414431587df112290bf878ad7de7b01199445b01eec4f

Contents?: true

Size: 646 Bytes

Versions: 22

Compression:

Stored size: 646 Bytes

Contents

module CFoundry::V1
  class Service
    attr_accessor :label, :version, :description, :type, :provider, :state

    def initialize(label, version = nil, description = nil,
                   type = nil, provider = "core", state = nil)
      @label = label
      @description = description
      @version = version
      @type = type
      @provider = provider
      @state = state
    end

    def eql?(other)
      other.is_a?(self.class) && other.label == @label
    end
    alias :== :eql?

    def active
      true
    end

    def deprecated?
      @state == :deprecated
    end

    def current?
      @state == :current
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
cfoundry-0.4.21 lib/cfoundry/v1/service.rb
cfoundry-0.5.0 lib/cfoundry/v1/service.rb
cfoundry-0.4.19 lib/cfoundry/v1/service.rb
cfoundry-0.4.18 lib/cfoundry/v1/service.rb
cfoundry-0.4.17 lib/cfoundry/v1/service.rb
cfoundry-0.4.16 lib/cfoundry/v1/service.rb
cfoundry-0.4.15 lib/cfoundry/v1/service.rb
cfoundry-0.4.14 lib/cfoundry/v1/service.rb
cfoundry-0.4.13 lib/cfoundry/v1/service.rb
cfoundry-0.4.12 lib/cfoundry/v1/service.rb
cfoundry-0.4.11 lib/cfoundry/v1/service.rb
cfoundry-0.4.10 lib/cfoundry/v1/service.rb
cfoundry-0.4.9 lib/cfoundry/v1/service.rb
cfoundry-0.4.8 lib/cfoundry/v1/service.rb
cfoundry-0.4.7 lib/cfoundry/v1/service.rb
cfoundry-0.4.6 lib/cfoundry/v1/service.rb
cfoundry-0.4.5 lib/cfoundry/v1/service.rb
cfoundry-0.4.4 lib/cfoundry/v1/service.rb
cfoundry-0.4.3 lib/cfoundry/v1/service.rb
cfoundry-0.4.2 lib/cfoundry/v1/service.rb