Class: Qcmd::Machine
- Inherits:
-
Struct
- Object
- Struct
- Qcmd::Machine
- Defined in:
- lib/qcmd/machine.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#name ⇒ Object
Returns the value of attribute name.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
- #client_arguments ⇒ Object
- #client_string ⇒ Object
- #find_workspace(name) ⇒ Object
- #workspace_names ⇒ Object
- #workspaces ⇒ Object
- #workspaces=(val) ⇒ Object
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address
2 3 4 |
# File 'lib/qcmd/machine.rb', line 2 def address @address end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/qcmd/machine.rb', line 2 def name @name end |
#port ⇒ Object
Returns the value of attribute port
2 3 4 |
# File 'lib/qcmd/machine.rb', line 2 def port @port end |
Instance Method Details
#client_arguments ⇒ Object
3 4 5 |
# File 'lib/qcmd/machine.rb', line 3 def client_arguments [address, port] end |
#client_string ⇒ Object
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_names ⇒ Object
19 20 21 |
# File 'lib/qcmd/machine.rb', line 19 def workspace_names @workspaces.map(&:name) || [] end |
#workspaces ⇒ Object
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 |