Module: Sys::Proc::Concern::System
- Extended by:
- ActiveSupport::Concern
- Includes:
- Helper
- Included in:
- Sys::Proc
- Defined in:
- lib/sys/proc/concern/system.rb
Overview
Provides Operating System related methods
This Concern loads system (OS) related sub-concern (specialisation)
Defined Under Namespace
Modules: Freebsd, Generic, LinuxGnu
Instance Method Summary collapse
-
#system ⇒ Symbol
Identify operating system.
-
#system_concern ⇒ Module
Get operating system related concern.
Instance Method Details
#system ⇒ Symbol
Identify operating system
25 26 27 |
# File 'lib/sys/proc/concern/system.rb', line 25 def system (@system || helper.get(:system).identify).to_sym end |
#system_concern ⇒ Module
Get operating system related concern
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/sys/proc/concern/system.rb', line 32 def system_concern inflector = helper.get(:inflector) begin inflector.resolve("sys/proc/concern/system/#{system}") rescue LoadError => e # m = /^cannot load such file -- #{Regexp.quote(system)}/ =~ e.to_s inflector.resolve('sys/proc/concern/system/generic') end end |