Sha256: cb5a51598b9787c1f9805bfe3fb79331ef73e8d0bf30c4260a0b670d8147c980
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
# -*- encoding: UTF-8 -*- module CSD module Extensions # This namespace is given to all extensions made to third-party Gems. # module Gem # This module comprises extensions to the Array object. # module Platform # This method returns a human-readable string for the current OS and CPU architecture. # def humanize version_string = version ? ", version #{version}" : '' "#{os} (#{cpu}#{version_string})" end # On linux systems, this method returns the current kernel version. # def kernel_version Cmd.run('uname --kernel-version', :silent => true).output.chop if os == 'linux' end # On linux systems, this method returns the current kernel release. # def kernel_release Cmd.run('uname --kernel-release', :silent => true).output.chop if os == 'linux' end end end end end module Gem class Platform #:nodoc: include CSD::Extensions::Gem::Platform end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
csd-0.1.6 | lib/csd/extensions/gem/platform.rb |