Class: Vito::OperatingSystems::Ubuntu10

Inherits:
Object
  • Object
show all
Defined in:
lib/vito/operating_systems/ubuntu_10.rb

Constant Summary collapse

NAME =
:ubuntu
VERSION =
"10"

Instance Method Summary collapse

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

Returns:

  • (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_packagesObject



16
17
18
# File 'lib/vito/operating_systems/ubuntu_10.rb', line 16

def update_packages
  @connection.run("sudo apt-get update")
end