os-name 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +10 -1
- data/lib/os-name.rb +19 -1
- data/lib/os-name/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
data/lib/os-name.rb
CHANGED
@@ -22,7 +22,17 @@ module OS
|
|
22
22
|
end
|
23
23
|
|
24
24
|
alias to_s name
|
25
|
-
|
25
|
+
|
26
|
+
def to_sym
|
27
|
+
name.downcase.delete(' ').to_sym
|
28
|
+
end
|
29
|
+
|
30
|
+
alias intern to_sym
|
31
|
+
|
32
|
+
def linux?
|
33
|
+
name == 'Linux'
|
34
|
+
end
|
35
|
+
|
26
36
|
def osx?
|
27
37
|
name == 'OS X'
|
28
38
|
end
|
@@ -30,5 +40,13 @@ module OS
|
|
30
40
|
def windows?
|
31
41
|
name == 'Windows'
|
32
42
|
end
|
43
|
+
|
44
|
+
def solaris?
|
45
|
+
name == 'Solaris'
|
46
|
+
end
|
47
|
+
|
48
|
+
def bsd?
|
49
|
+
name == 'BSD'
|
50
|
+
end
|
33
51
|
end
|
34
52
|
end
|
data/lib/os-name/version.rb
CHANGED