Sha256: baa9d5906616b38ff11a236c7d077a8f2ce51a8ed154c8504a4d3333f02a3056
Contents?: true
Size: 819 Bytes
Versions: 3
Compression:
Stored size: 819 Bytes
Contents
# vim: set ts=2 sw=2 et: module PolySSH class NodeList include Visitable include Enumerable def each ptr = @head while not ptr.nil? do yield ptr ptr = ptr.next end end def initialize @head = nil @tail = nil end def <<(node) if @head.nil? then @head = node @tail = node else @tail.next = node @tail = node end self end end class NodeEntry include Visitable attr_accessor :port attr_accessor :user attr_accessor :host attr_accessor :next attr_accessor :args def initialize(user:, host:, port: nil, args: nil) @user = user @host = host @port = port || 22 @args = args || [] # Linked list part @next = nil end end #class end #module
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
polyssh-0.1.2 | lib/polyssh/node.rb |
polyssh-0.1.1 | lib/polyssh/node.rb |
polyssh-0.1.0 | lib/polyssh/node.rb |