Parent

Launchy::Detect::HostOsFamily

Detect the current host os family

If the current host familiy cannot be detected then return HostOsFamily::Unknown

Attributes

host_os[R]

Public Class Methods

cygwin?() click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 25
25:       def cygwin?()  self == Cygwin;  end
darwin?() click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 23
23:       def darwin?()  self == Darwin;  end
detect( host_os = HostOs.new ) click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 12
12:       def detect( host_os = HostOs.new )
13:         found = find_child( :matches?, host_os )
14:         return found.new( host_os ) if found
15:         raise NotFoundError, "Unknown OS family for host os '#{host_os}'. #{Launchy.bug_report_message}"
16:       end
matches?( host_os ) click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 18
18:       def matches?( host_os )
19:         matching_regex.match( host_os.to_s )
20:       end
new( host_os = HostOs.new ) click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 30
30:     def initialize( host_os = HostOs.new )
31:       @host_os = host_os
32:     end
nix?() click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 24
24:       def nix?()     self == Nix;     end
windows?() click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 22
22:       def windows?() self == Windows; end

Public Instance Methods

cygwin?() click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 37
37:     def cygwin?()  self.class.cygwin?;  end
darwin?() click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 35
35:     def darwin?()  self.class.darwin?;  end
nix?() click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 36
36:     def nix?()     self.class.nix?;      end
windows?() click to toggle source
    # File lib/launchy/detect/host_os_family.rb, line 34
34:     def windows?() self.class.windows?; end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.