Class: Launchy::Detect::HostOs
- Inherits:
-
Object
- Object
- Launchy::Detect::HostOs
- Defined in:
- lib/launchy/detect/host_os.rb
Overview
Internal: Determine the host operating system that Launchy is running on
Instance Attribute Summary collapse
-
#host_os ⇒ Object
(also: #to_s, #to_str)
readonly
Returns the value of attribute host_os.
Instance Method Summary collapse
- #default_host_os ⇒ Object
-
#initialize(host_os = nil) ⇒ HostOs
constructor
A new instance of HostOs.
- #override_host_os ⇒ Object
Constructor Details
#initialize(host_os = nil) ⇒ HostOs
Returns a new instance of HostOs.
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/launchy/detect/host_os.rb', line 14 def initialize(host_os = nil) @host_os = host_os return if @host_os if (@host_os = override_host_os) Launchy.log "Using LAUNCHY_HOST_OS override value of '#{Launchy.host_os}'" else @host_os = default_host_os end end |
Instance Attribute Details
#host_os ⇒ Object (readonly) Also known as: to_s, to_str
Returns the value of attribute host_os.
10 11 12 |
# File 'lib/launchy/detect/host_os.rb', line 10 def host_os @host_os end |