Module: Candelabra::Ubuntu

Included in:
EventCmd, Installer
Defined in:
lib/candelabra/ubuntu.rb

Overview

This module contains installer specific instructions for Ubuntu using home bree Home apt_get is the best package manager for Ubuntu right now and the package manager that is going to be supported. Include this module into your class/module and you will be able to install using home apt_get.

NOTE: This module will only be active if the os is Ubuntu

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.extended(klass) ⇒ Object

Load the installer methods IF this is the correct OS



64
65
66
# File 'lib/candelabra/ubuntu.rb', line 64

def self.extended klass
  klass.extend( InstanceMethods ) if linux?
end

.included(klass) ⇒ Object

Load the installer methods IF this is the correct OS



69
70
71
# File 'lib/candelabra/ubuntu.rb', line 69

def self.included klass
  klass.send( :include, InstanceMethods ) if linux?
end

.linux?Boolean

This method will say if the OS is Ubuntu or not

Example:

[ On Ubuntu ] linux?
  # => true

[ On OSX ] linux?
  # => false

Returns true for Ubuntu

Returns:

  • (Boolean)


83
84
85
# File 'lib/candelabra/ubuntu.rb', line 83

def self.linux?
  /linux/ =~ RbConfig::CONFIG["target_os"]
end