eitil 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f742ee647b11b18765c5022fe55301317822282c3443cd161e0d49ded69678cf
4
- data.tar.gz: 10aa2196982292c2cab87a25906b59eba9147294dfdddaafce8a53eb8521c7b7
3
+ metadata.gz: ac7bd5bff2af923e06936b0016f4f07f8d4eba225a68dc193bdf5f277bcdbb97
4
+ data.tar.gz: 193b41fa2a5fde545b189b79a2c94328c242bf45d71ff5802cfab3fb7b95c402
5
5
  SHA512:
6
- metadata.gz: 13b655a01ff36fd371f50cc9868409a0a0d51520afffaf3d8871bd9955a502bf342945f51d0f551cbd9c58b97bdcc6fa7d28f9a09ee06b9c1e127764abbc3854
7
- data.tar.gz: c7a02991659f2c23d9c4846d2377e6160a3f15fdd0119f231ad1e78fef0686ba651c35c25b283f49405cd5f1fc545d40d082c7ff7639ee080cef76d8b25ff7b6
6
+ metadata.gz: 52c86de08e26441922852f3cd5563a36ac46c585a3ab50745e1f0fc2dacf9dc6187574f54c7c33ba415fdd3be006e0c45b7245076b209fd74a3782b07c1ace34
7
+ data.tar.gz: 0bf06bc0226924db17b2c9b7f9138eac75116cb4d351fe9818690f2745cfaa68d43eac837dbfb0825b6870eeeb0ab4b50cb091ed05243b533501498d8ca60eac
data/README.md CHANGED
@@ -109,10 +109,12 @@ include_concerns_of(*directories, namespace: nil)
109
109
  is_num?
110
110
  # returns true if a string matches the Rubinius source code regex for strings and integers, false otherwise
111
111
  # comes in handy since ruby plays it safe on string to number conversion ('aaa'.to_f returns 0.0, thus is valid)
112
+ # this method is also implemented for all other classes, such as Integer, Float, NilClass, TrueClass, Hash and so on...
112
113
 
113
114
  is_nan?
114
115
  # returns true if a string does NOT match the Rubinius source code regex for strings and integers, false otherwise
115
116
  # comes in handy since ruby plays it safe on string to number conversion ('aaa'.to_f returns 0.0, thus is valid)
117
+ # this method is also implemented for all other classes, such as Integer, Float, NilClass, TrueClass, Hash and so on...
116
118
  ```
117
119
 
118
120
 
@@ -13,4 +13,84 @@ class String
13
13
  !is_nan?
14
14
  end
15
15
 
16
- end
16
+ end
17
+
18
+ # Descending classes which are always numeric
19
+
20
+ class Numeric
21
+
22
+ def is_nan?
23
+ false
24
+ end
25
+
26
+ def is_num?
27
+ true
28
+ end
29
+
30
+ end
31
+
32
+ # Classes which are never numeric
33
+
34
+ class NilClass
35
+
36
+ def is_nan?
37
+ true
38
+ end
39
+
40
+ def is_num?
41
+ false
42
+ end
43
+
44
+ end
45
+
46
+
47
+ class TrueClass
48
+
49
+ def is_nan?
50
+ true
51
+ end
52
+
53
+ def is_num?
54
+ false
55
+ end
56
+
57
+ end
58
+
59
+
60
+ class FalseClass
61
+
62
+ def is_nan?
63
+ true
64
+ end
65
+
66
+ def is_num?
67
+ false
68
+ end
69
+
70
+ end
71
+
72
+
73
+ class Hash
74
+
75
+ def is_nan?
76
+ true
77
+ end
78
+
79
+ def is_num?
80
+ false
81
+ end
82
+
83
+ end
84
+
85
+
86
+ class Array
87
+
88
+ def is_nan?
89
+ true
90
+ end
91
+
92
+ def is_num?
93
+ false
94
+ end
95
+
96
+ end
data/lib/eitil/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eitil
2
- VERSION = '0.3.8'
2
+ VERSION = '0.3.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eitil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurriaan Schrofer