Class: UsefulUtilities::CentOSVersion
- Inherits:
- 
      Object
      
        - Object
- UsefulUtilities::CentOSVersion
 
- Defined in:
- lib/useful_utilities/centos_version.rb
Overview
CentOS versions utilities
Instance Attribute Summary collapse
- 
  
    
      #version  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute version. 
Class Method Summary collapse
- .centos5?(*args) ⇒ Boolean
- .centos6?(*args) ⇒ Boolean
- .centos7?(*args) ⇒ Boolean
- .five? ⇒ Boolean
- .not_centos5?(*args) ⇒ Boolean
- .seven? ⇒ Boolean
- .six? ⇒ Boolean
Instance Method Summary collapse
- #centos5? ⇒ Boolean (also: #five?)
- #centos6? ⇒ Boolean (also: #six?)
- #centos7? ⇒ Boolean (also: #seven?)
- 
  
    
      #initialize(version)  ⇒ CentOSVersion 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of CentOSVersion. 
- #not_centos5? ⇒ Boolean
Constructor Details
#initialize(version) ⇒ CentOSVersion
Returns a new instance of CentOSVersion.
| 6 7 8 | # File 'lib/useful_utilities/centos_version.rb', line 6 def initialize(version) @version = version.to_i end | 
Instance Attribute Details
#version ⇒ Object (readonly)
Returns the value of attribute version.
| 4 5 6 | # File 'lib/useful_utilities/centos_version.rb', line 4 def version @version end | 
Class Method Details
.centos5?(*args) ⇒ Boolean
| 11 12 13 | # File 'lib/useful_utilities/centos_version.rb', line 11 def centos5?(*args) new(*args).centos5? end | 
.centos6?(*args) ⇒ Boolean
| 16 17 18 | # File 'lib/useful_utilities/centos_version.rb', line 16 def centos6?(*args) new(*args).centos6? end | 
.centos7?(*args) ⇒ Boolean
| 21 22 23 | # File 'lib/useful_utilities/centos_version.rb', line 21 def centos7?(*args) new(*args).centos7? end | 
.five? ⇒ Boolean
| 14 15 16 | # File 'lib/useful_utilities/centos_version.rb', line 14 def centos5?(*args) new(*args).centos5? end | 
.not_centos5?(*args) ⇒ Boolean
| 26 27 28 | # File 'lib/useful_utilities/centos_version.rb', line 26 def not_centos5?(*args) new(*args).not_centos5? end | 
.seven? ⇒ Boolean
| 24 25 26 | # File 'lib/useful_utilities/centos_version.rb', line 24 def centos7?(*args) new(*args).centos7? end | 
.six? ⇒ Boolean
| 19 20 21 | # File 'lib/useful_utilities/centos_version.rb', line 19 def centos6?(*args) new(*args).centos6? end | 
Instance Method Details
#centos5? ⇒ Boolean Also known as: five?
| 31 32 33 | # File 'lib/useful_utilities/centos_version.rb', line 31 def centos5? version == 5 end | 
#centos6? ⇒ Boolean Also known as: six?
| 36 37 38 | # File 'lib/useful_utilities/centos_version.rb', line 36 def centos6? version == 6 end | 
#centos7? ⇒ Boolean Also known as: seven?
| 41 42 43 | # File 'lib/useful_utilities/centos_version.rb', line 41 def centos7? version == 7 end | 
#not_centos5? ⇒ Boolean
| 46 47 48 | # File 'lib/useful_utilities/centos_version.rb', line 46 def not_centos5? !centos5? end |