Class: Rubear
- Inherits:
-
Object
- Object
- Rubear
- 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
-
#initialize(container_name) ⇒ Rubear
constructor
A new instance of Rubear.
-
#start_lxc ⇒ Object
-
instance.start_lxc.
-
-
#stop_lxc ⇒ Object
-
instance.stop_lxc.
-
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_lxc ⇒ Object
-
instance.start_lxc
24 25 26 |
# File 'lib/rubear.rb', line 24 def start_lxc `sudo lxc-start -n #{@container_name}` end |
#stop_lxc ⇒ Object
-
instance.stop_lxc
29 30 31 |
# File 'lib/rubear.rb', line 29 def stop_lxc `sudo lxc-stop -n #{@container_name}` end |