Module: Platform::OS::OSX::SystemProfiler
- Defined in:
- lib/Platform/OS/OSX/SystemProfiler.rb
Class Method Summary collapse
- .major_system_version ⇒ Object
- .minor_system_version ⇒ Object
- .system_version ⇒ Object
- .tiny_system_version ⇒ Object
Class Method Details
.major_system_version ⇒ Object
21 22 23 |
# File 'lib/Platform/OS/OSX/SystemProfiler.rb', line 21 def major_system_version system_version.split('.').first.to_i end |
.minor_system_version ⇒ Object
25 26 27 |
# File 'lib/Platform/OS/OSX/SystemProfiler.rb', line 25 def minor_system_version system_version.split('.').second.to_i end |
.system_version ⇒ Object
17 18 19 |
# File 'lib/Platform/OS/OSX/SystemProfiler.rb', line 17 def system_version `system_profiler SPSoftwareDataType`.force_encoding('UTF-8').grep(/System Version/).split(': ').second.split.fourth end |
.tiny_system_version ⇒ Object
29 30 31 |
# File 'lib/Platform/OS/OSX/SystemProfiler.rb', line 29 def tiny_system_version system_version.split('.').third.to_i end |