Class: OctaSpace::Types::Node

Inherits:
Data
  • Object
show all
Defined in:
lib/octaspace/types/node.rb

Overview

Value object representing a compute node

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



6
7
8
# File 'lib/octaspace/types/node.rb', line 6

def id
  @id
end

#ipObject (readonly)

Returns the value of attribute ip

Returns:

  • (Object)

    the current value of ip



6
7
8
# File 'lib/octaspace/types/node.rb', line 6

def ip
  @ip
end

#locationObject (readonly)

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



6
7
8
# File 'lib/octaspace/types/node.rb', line 6

def location
  @location
end

#pricesObject (readonly)

Returns the value of attribute prices

Returns:

  • (Object)

    the current value of prices



6
7
8
# File 'lib/octaspace/types/node.rb', line 6

def prices
  @prices
end

#stateObject (readonly)

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



6
7
8
# File 'lib/octaspace/types/node.rb', line 6

def state
  @state
end

#systemObject (readonly)

Returns the value of attribute system

Returns:

  • (Object)

    the current value of system



6
7
8
# File 'lib/octaspace/types/node.rb', line 6

def system
  @system
end

Instance Method Details

#offline?Boolean

Returns:

  • (Boolean)


9
# File 'lib/octaspace/types/node.rb', line 9

def offline? = !online?

#online?Boolean

Returns:

  • (Boolean)


8
# File 'lib/octaspace/types/node.rb', line 8

def online? = state == "online"