Class: Qcmd::Machine

Inherits:
Struct
  • Object
show all
Defined in:
lib/qcmd/machine.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressObject

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



2
3
4
# File 'lib/qcmd/machine.rb', line 2

def address
  @address
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/qcmd/machine.rb', line 2

def name
  @name
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



2
3
4
# File 'lib/qcmd/machine.rb', line 2

def port
  @port
end

Instance Method Details

#client_argumentsObject



3
4
5
# File 'lib/qcmd/machine.rb', line 3

def client_arguments
  [address, port]
end

#client_stringObject



7
8
9
# File 'lib/qcmd/machine.rb', line 7

def client_string
  "#{ address }:#{ port }"
end

#find_workspace(name) ⇒ Object



23
24
25
# File 'lib/qcmd/machine.rb', line 23

def find_workspace name
  @workspaces.find {|ws| ws.name == name}
end

#workspace_namesObject



19
20
21
# File 'lib/qcmd/machine.rb', line 19

def workspace_names
  @workspaces.map(&:name) || []
end

#workspacesObject



15
16
17
# File 'lib/qcmd/machine.rb', line 15

def workspaces
  @workspaces || []
end

#workspaces=(val) ⇒ Object



11
12
13
# File 'lib/qcmd/machine.rb', line 11

def workspaces= val
  @workspaces = val
end