Class: Omc::Instance

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/omc/instances.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/omc/instances.rb', line 5

def attributes
  @attributes
end

#stackObject (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

Returns:

  • (Boolean)


21
22
23
# File 'lib/omc/instances.rb', line 21

def offline?
  !online?
end

#online?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/omc/instances.rb', line 17

def online?
  attributes[:status] == "online"
end