Class: OsCtld::Config::CpuPackage
- Inherits:
- 
      Object
      
        - Object
- OsCtld::Config::CpuPackage
 
- Defined in:
- lib/osctld/config.rb
Instance Attribute Summary collapse
- #cpu_mask ⇒ OsCtl::Lib::CpuMask readonly
- #enable ⇒ Boolean (also: #enable?) readonly
- #id ⇒ Integer readonly
Instance Method Summary collapse
- 
  
    
      #initialize(id, cfg)  ⇒ CpuPackage 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of CpuPackage. 
Constructor Details
#initialize(id, cfg) ⇒ CpuPackage
Returns a new instance of CpuPackage.
| 51 52 53 54 55 | # File 'lib/osctld/config.rb', line 51 def initialize(id, cfg) @id = id.to_i @enable = cfg.fetch('enable', true) @cpu_mask = OsCtl::Lib::CpuMask.new(cfg.fetch('cpu_mask', '*')) end | 
Instance Attribute Details
#cpu_mask ⇒ OsCtl::Lib::CpuMask (readonly)
| 49 50 51 | # File 'lib/osctld/config.rb', line 49 def cpu_mask @cpu_mask end | 
#enable ⇒ Boolean (readonly) Also known as: enable?
| 45 46 47 | # File 'lib/osctld/config.rb', line 45 def enable @enable end | 
#id ⇒ Integer (readonly)
| 42 43 44 | # File 'lib/osctld/config.rb', line 42 def id @id end |