Class: Rubear

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

Overview

init info

class Rubear(container_name)

To use

y = Rubear.new(“container_name”) y.lxc_start y.lxc_stop

  • require sudo

Created by itsabear <[email protected]>
  • junk gem :P

Instance Method Summary collapse

Constructor Details

#initialize(container_name) ⇒ Rubear

Returns a new instance of Rubear.



18
19
20
21
# File 'lib/rubear.rb', line 18

def initialize(container_name)
	@container_name = container_name

end

Instance Method Details

#start_lxcObject

  • instance.start_lxc



24
25
26
# File 'lib/rubear.rb', line 24

def start_lxc
	`sudo lxc-start -n #{@container_name}`
end

#stop_lxcObject

  • instance.stop_lxc



29
30
31
# File 'lib/rubear.rb', line 29

def stop_lxc
	`sudo lxc-stop -n #{@container_name}`
end