Class: Vito::OperatingSystems::Ubuntu10
- Inherits:
-
Object
- Object
- Vito::OperatingSystems::Ubuntu10
- Defined in:
- lib/vito/operating_systems/ubuntu_10.rb
Constant Summary collapse
- NAME =
:ubuntu- VERSION =
"10"
Instance Method Summary collapse
-
#initialize(connection) ⇒ Ubuntu10
constructor
A new instance of Ubuntu10.
- #install_dependencies(dependencies) ⇒ Object
- #is?(name, version = nil) ⇒ Boolean
- #update_packages ⇒ Object
Constructor Details
#initialize(connection) ⇒ Ubuntu10
Returns a new instance of Ubuntu10.
7 8 9 |
# File 'lib/vito/operating_systems/ubuntu_10.rb', line 7 def initialize(connection) @connection = connection end |
Instance Method Details
#install_dependencies(dependencies) ⇒ Object
20 21 22 |
# File 'lib/vito/operating_systems/ubuntu_10.rb', line 20 def install_dependencies(dependencies) @connection.run("sudo apt-get install -y #{dependencies.join(" ")}") end |
#is?(name, version = nil) ⇒ Boolean
11 12 13 14 |
# File 'lib/vito/operating_systems/ubuntu_10.rb', line 11 def is?(name, version = nil) version = VERSION unless version name == NAME && version.to_s == VERSION end |
#update_packages ⇒ Object
16 17 18 |
# File 'lib/vito/operating_systems/ubuntu_10.rb', line 16 def update_packages @connection.run("sudo apt-get update") end |