class Ec2ssh::SshConfig::Section
Constants
- HEADER
Attributes
name[RW]
text[R]
Public Class Methods
new(name, text = '')
click to toggle source
# File lib/ec2ssh/ssh_config.rb, line 83 def initialize(name, text = '') @name = name @text = text end
Public Instance Methods
append(text)
click to toggle source
# File lib/ec2ssh/ssh_config.rb, line 88 def append(text) @text << text end
replace!(text)
click to toggle source
# File lib/ec2ssh/ssh_config.rb, line 92 def replace!(text) @text = text end
to_s()
click to toggle source
# File lib/ec2ssh/ssh_config.rb, line 96 def to_s if text.empty? "" else <<-EOS #{HEADER} #{@name} #{@text} EOS end end