class SSHConfig::Hosts

Attributes

hosts[R]

Public Class Methods

new(&block) click to toggle source
# File lib/hosts.rb, line 5
def initialize(&block)
  @hosts = []
  self.instance_eval(&block)
end

Public Instance Methods

host(name) click to toggle source
# File lib/hosts.rb, line 14
def host(name)
  @hosts << Host.new(name, &Proc.new)
end
merge(morehosts) click to toggle source
# File lib/hosts.rb, line 10
def merge(morehosts)
  @hosts += morehosts.hosts
end
to_s() click to toggle source
# File lib/hosts.rb, line 18
def to_s
  @hosts.map(&:to_s).join("\n")
end