Class: Getch::Bask

Inherits:
Object
  • Object
show all
Defined in:
lib/getch/command.rb

Instance Method Summary collapse

Constructor Details

#initialize(cmd) ⇒ Bask

Returns a new instance of Bask.



59
60
61
62
63
64
65
# File 'lib/getch/command.rb', line 59

def initialize(cmd)
  @cmd = cmd
  @log = Log.new
  @version = '0.6'
  @config = "#{MOUNTPOINT}/etc/kernel/config.d"
  download_bask unless Dir.exist? "#{MOUNTPOINT}/root/bask-#{@version}"
end

Instance Method Details

#add(content) ⇒ Object



75
76
77
# File 'lib/getch/command.rb', line 75

def add(content)
  Helpers.add_file "#{@config}/#{@cmd}", content
end

#cpObject



67
68
69
70
71
72
73
# File 'lib/getch/command.rb', line 67

def cp
  NiTo.mkdir @config
  NiTo.cp(
    "#{MOUNTPOINT}/root/bask-#{@version}/config.d/#{@cmd}",
    "#{@config}/#{@cmd}"
  )
end