Class: CFoundry::V1::Service
- Inherits:
-
Object
- Object
- CFoundry::V1::Service
- Defined in:
- lib/appfog-vmc-plugin/cfoundry/v1/service.rb
Instance Attribute Summary collapse
-
#default_plan ⇒ Object
Returns the value of attribute default_plan.
-
#description ⇒ Object
Returns the value of attribute description.
-
#infra ⇒ Object
Returns the value of attribute infra.
-
#label ⇒ Object
Returns the value of attribute label.
-
#plans ⇒ Object
Returns the value of attribute plans.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#state ⇒ Object
Returns the value of attribute state.
-
#type ⇒ Object
Returns the value of attribute type.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #active ⇒ Object
- #current? ⇒ Boolean
- #deprecated? ⇒ Boolean
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(label, infra, version = nil, description = nil, type = nil, provider = "core", state = nil, plans = [], default_plan = nil) ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize(label, infra, version = nil, description = nil, type = nil, provider = "core", state = nil, plans = [], default_plan = nil) ⇒ Service
Returns a new instance of Service.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 5 def initialize(label, infra, version = nil, description = nil, type = nil, provider = "core", state = nil, plans = [], default_plan = nil) @label = label @infra = infra @description = description @version = version @type = type @provider = provider @state = state @plans = plans @default_plan = default_plan end |
Instance Attribute Details
#default_plan ⇒ Object
Returns the value of attribute default_plan.
3 4 5 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 3 def default_plan @default_plan end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 3 def description @description end |
#infra ⇒ Object
Returns the value of attribute infra.
3 4 5 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 3 def infra @infra end |
#label ⇒ Object
Returns the value of attribute label.
3 4 5 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 3 def label @label end |
#plans ⇒ Object
Returns the value of attribute plans.
3 4 5 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 3 def plans @plans end |
#provider ⇒ Object
Returns the value of attribute provider.
3 4 5 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 3 def provider @provider end |
#state ⇒ Object
Returns the value of attribute state.
3 4 5 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 3 def state @state end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 3 def type @type end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 3 def version @version end |
Instance Method Details
#active ⇒ Object
24 25 26 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 24 def active true end |
#current? ⇒ Boolean
32 33 34 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 32 def current? @state == :current end |
#deprecated? ⇒ Boolean
28 29 30 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 28 def deprecated? @state == :deprecated end |
#eql?(other) ⇒ Boolean Also known as: ==
19 20 21 |
# File 'lib/appfog-vmc-plugin/cfoundry/v1/service.rb', line 19 def eql?(other) other.is_a?(self.class) && other.label == @label end |