Sha256: 3f3e7d7ca8e4cb95684471f4aa4522b73b8baf299ec04e102b2cb37ec08fe93d

Contents?: true

Size: 453 Bytes

Versions: 20

Compression:

Stored size: 453 Bytes

Contents

module Qcmd
  class Machine < Struct.new(:name, :address, :port)
    def client_arguments
      [address, port]
    end

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

    def workspaces= val
      @workspaces = val
    end

    def workspaces
      @workspaces || []
    end

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

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
qcmd-0.2.0 lib/qcmd/machine.rb
qcmd-0.1.16 lib/qcmd/machine.rb
qcmd-0.1.16.pre2 lib/qcmd/machine.rb
qcmd-0.1.16.pre lib/qcmd/machine.rb
qcmd-0.1.15 lib/qcmd/machine.rb
qcmd-0.1.14 lib/qcmd/machine.rb
qcmd-0.1.13 lib/qcmd/machine.rb
qcmd-0.1.12 lib/qcmd/machine.rb
qcmd-0.1.11 lib/qcmd/machine.rb
qcmd-0.1.10 lib/qcmd/machine.rb
qcmd-0.1.9 lib/qcmd/machine.rb
qcmd-0.1.8 lib/qcmd/machine.rb
qcmd-0.1.7 lib/qcmd/machine.rb
qcmd-0.1.6 lib/qcmd/machine.rb
qcmd-0.1.5 lib/qcmd/machine.rb
qcmd-0.1.4 lib/qcmd/machine.rb
qcmd-0.1.3 lib/qcmd/machine.rb
qcmd-0.1.2 lib/qcmd/machine.rb
qcmd-0.1.1 lib/qcmd/machine.rb
qcmd-0.1.0 lib/qcmd/machine.rb