class Rc
Public Class Methods
configs(base, configs)
click to toggle source
# File lib/capistrano-freebsd/rc.rb, line 23 def self.configs base, configs section base print_lines(configs.map { |config| base + '_' + config }) end
init(lines)
click to toggle source
# File lib/capistrano-freebsd/rc.rb, line 8 def self.init lines as :root do execute :echo, "> #{@@path}" end print_lines [ "# These configurations are automatically generated", "# at #{Datetime.now.to_s}.", ] end
print_line(line)
click to toggle source
# File lib/capistrano-freebsd/rc.rb, line 32 def self.print_line line as :root do execute :echo, "#{line} >> #{@@path}" end end
print_lines(lines)
click to toggle source
# File lib/capistrano-freebsd/rc.rb, line 28 def self.print_lines lines lines.map(&method(:print_line)) end
section(title)
click to toggle source
# File lib/capistrano-freebsd/rc.rb, line 19 def self.section title print_lines ["", "# #{title}"] end