rubyhelper 0.2.3.5 → 0.2.4

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
  SHA1:
3
- metadata.gz: 4d363a43ed46d5a3d9a99c590029cc1fca0559aa
4
- data.tar.gz: 3007d9a4975658e4b21d73f1112790d0be8374b8
3
+ metadata.gz: c821c362cc1520ecfca8057736a2822960fc33f8
4
+ data.tar.gz: 1dae1f8ac6991d29c0cacdff681d7f991f140255
5
5
  SHA512:
6
- metadata.gz: e771db04346db46a050374c49cae1320236268cbc4dc90cc24caa71bed9561876eb25a64a9e0c04b5e400603a4ed7cb960c2f311a3c0a5c660887fba21144601
7
- data.tar.gz: b4ffc21d8a52ad7944e0a84256913f9b71e20e80fb32c6a111686a5901720fa6692b4aeed3272f0278304efaedc046cc9094a05ce6c58f2c543aee49d3c7f0cd
6
+ metadata.gz: 299aca8153165eb7a6d15ae623360484ccfa622d31153e993b55115d8eadfcf5c0e52848eadc51472a31e91bda9543dec987b64a390348f143b202c37a78654e
7
+ data.tar.gz: f102e264cd1602530f42fb698299a8e83f01bc945fbf764b326663284957bab21b1ca0c161e0f5cf705e15f1c55077c87ca2982d381daeb47338d6f9dc8b2500
@@ -18,7 +18,7 @@ module StringHelper
18
18
  return string
19
19
  end
20
20
  end
21
-
21
+
22
22
  def to_case(case_mod = :downcase)
23
23
  if case_mod == :upcase
24
24
  return self.to_plain.upcase
@@ -26,7 +26,7 @@ module StringHelper
26
26
  return self.to_plain.downcase
27
27
  end
28
28
  end
29
-
29
+
30
30
  def to_ascii(case_mod = :upcase)
31
31
  return to_case(case_mod)
32
32
  end
@@ -73,6 +73,16 @@ module StringHelper
73
73
  end
74
74
  end
75
75
 
76
+ #get only the digits and symbols in the string
77
+ def get_int
78
+ return self.gsub(/[^\d\-\+]/, "")
79
+ end
80
+
81
+ #as get_int but with . and ,
82
+ def get_float
83
+ return self.gsub(/[^\d\.\,\-\+]/, "")
84
+ end
85
+
76
86
  end
77
87
 
78
88
  class String
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyhelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3.5
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - poulet_a
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-19 00:00:00.000000000 Z
11
+ date: 2014-08-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A list of utils for the basic Class of ruby.
14
14
  email:
@@ -50,6 +50,6 @@ rubyforge_project:
50
50
  rubygems_version: 2.4.1
51
51
  signing_key:
52
52
  specification_version: 4
53
- summary: improve to_simple_time
53
+ summary: to_int / float
54
54
  test_files: []
55
55
  has_rdoc: