Class: Omc::Instance
- Inherits:
-
Object
- Object
- Omc::Instance
- Extended by:
- Forwardable
- Defined in:
- lib/omc/instances.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#stack ⇒ Object
readonly
Returns the value of attribute stack.
Instance Method Summary collapse
-
#initialize(stack, attributes) ⇒ Instance
constructor
A new instance of Instance.
- #offline? ⇒ Boolean
- #online? ⇒ Boolean
Constructor Details
#initialize(stack, attributes) ⇒ Instance
Returns a new instance of Instance.
12 13 14 15 |
# File 'lib/omc/instances.rb', line 12 def initialize stack, attributes @stack = stack @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/omc/instances.rb', line 5 def attributes @attributes end |
#stack ⇒ Object (readonly)
Returns the value of attribute stack.
5 6 7 |
# File 'lib/omc/instances.rb', line 5 def stack @stack end |
Instance Method Details
#offline? ⇒ Boolean
21 22 23 |
# File 'lib/omc/instances.rb', line 21 def offline? !online? end |
#online? ⇒ Boolean
17 18 19 |
# File 'lib/omc/instances.rb', line 17 def online? attributes[:status] == "online" end |