Class: Getch::Bask
- Inherits:
-
Object
- Object
- Getch::Bask
- Defined in:
- lib/getch/command.rb
Instance Method Summary collapse
- #add(content) ⇒ Object
- #cp ⇒ Object
-
#initialize(cmd) ⇒ Bask
constructor
A new instance of Bask.
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 |
#cp ⇒ Object
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 |