Module: Candelabra::OSX
Overview
This module contains installer specific instructions for OSX using home bree Home brew is the best package manager for OSX 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 brew.
NOTE: This module will only be active if the os is OSX
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
-
.extended(klass) ⇒ Object
Load the installer methods IF this is the correct OS.
-
.included(klass) ⇒ Object
Load the installer methods IF this is the correct OS.
-
.osx? ⇒ Boolean
This method will say if the OS is OSX or not.
Class Method Details
.extended(klass) ⇒ Object
Load the installer methods IF this is the correct OS
65 66 67 |
# File 'lib/candelabra/osx.rb', line 65 def self.extended klass klass.extend( InstanceMethods ) if osx? end |
.included(klass) ⇒ Object
Load the installer methods IF this is the correct OS
70 71 72 |
# File 'lib/candelabra/osx.rb', line 70 def self.included klass klass.send( :include, InstanceMethods ) if osx? end |
.osx? ⇒ Boolean
This method will say if the OS is OSX or not
Example:
[ On OSX ] osx?
# => true
[ On Linux ] osx?
# => false
Returns true for OSX
84 85 86 |
# File 'lib/candelabra/osx.rb', line 84 def self.osx? !( /darwin/ =~ RbConfig::CONFIG["target_os"] ).nil? end |