Module: Aio::Base::Toolkit::OS

Defined in:
lib/aio/base/toolkit/os.rb

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/aio/base/toolkit/os.rb', line 21

def linux?
	self.os_family == "unix" ? true : false
end

.os_familyObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/aio/base/toolkit/os.rb', line 4

def os_family  
	case RUBY_PLATFORM  
	when /ix/i, /ux/i, /gnu/i,  
			 /sysv/i, /solaris/i,  
			 /sunos/i, /bsd/i  
		"unix"  
	when /win/i, /ming/i  
		"windows"  
	else  
		"other"  
	end  
end

.windows?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/aio/base/toolkit/os.rb', line 17

def windows?
	self.os_family == "windows" ? true : false
end