natural_number_string 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42b9e07bfda6ebb1b1c3c5f5cacef8d6c761ff7b
4
- data.tar.gz: 4e0b64598fd8900dfbce7121feb39853e3358138
3
+ metadata.gz: 558a4c943d3c6c6e40dcc8498c4b989cf781acfc
4
+ data.tar.gz: bc1d1f75537a0e95f78810e562d41834b709e90d
5
5
  SHA512:
6
- metadata.gz: 783e0ec4ba9ed7a14050e154cdac6ea8c6fe1ec6f36349c455321cb8d993b0136b1334d561c7b5e913c4df784590bedb06213172719c95709d735ef0573235ea
7
- data.tar.gz: 6d415ae4035cd192cf09dfc609e806e82713b4e1d829b849300778e1b843527e132db2fc52a545263115f1ba1aa8d36c5adbdfd1d44d08bf35116fc8c94d1777
6
+ metadata.gz: 2af6dc71c6f4c2fd87feb89eacb362b443b92fd078eabaf9337727429bfbfe3d04e8f612deffbd843f07f87c620d126d555fb6480d6c19f4d864317d0fa0749e
7
+ data.tar.gz: 4a4f57132abb386b4614b588f85c2d78cfeeaa343d90840765cdb593e354ac0766f982ecfd23f531cd2fa2ae4f2cb43499a55a28ee4faf2931e25abe5d608df5
data/README.md CHANGED
@@ -2,14 +2,62 @@
2
2
 
3
3
  [![Gem version][gem-image]][gem-url] [![Travis-CI Status][travis-image]][travis-url]
4
4
 
5
- > Check the string is a natural number?
5
+ > Check the string is a natural number.
6
6
 
7
7
 
8
8
  ## Usage
9
9
 
10
+ ```ruby
11
+ require 'natural_number_string'
12
+
13
+ # Use include
14
+ class Example
15
+ include NaturalNumberString
16
+ def example
17
+ positive_integer_string?('1') #=> true
18
+ positive_integer_string?('100000000000000') #=> true
19
+
20
+ positive_integer_string?(nil) #=> false
21
+ positive_integer_string?('') #=> false
22
+ positive_integer_string?(1) #=> false
23
+ positive_integer_string?('1.1') #=> false
24
+ positive_integer_string?('-1') #=> false
25
+ positive_integer_string?('0') #=> false
26
+ end
27
+ end
28
+
29
+ # Use direct
30
+ NaturalNumberString.positive_integer_string?('1') #=> true
31
+ NaturalNumberString.positive_integer_string?('100000000000') #=> true
32
+
33
+ NaturalNumberString.positive_integer_string?(nil) #=> false
34
+ NaturalNumberString.positive_integer_string?('') #=> false
35
+ NaturalNumberString.positive_integer_string?(1) #=> false
36
+ NaturalNumberString.positive_integer_string?('1.1') #=> false
37
+ NaturalNumberString.positive_integer_string?('-1') #=> false
38
+ NaturalNumberString.positive_integer_string?('0') #=> false
39
+ ```
40
+
10
41
 
11
42
  ## API
12
43
 
44
+ ### NaturalNumberString.positive_integer_string?(value) -> boolean
45
+
46
+ #### value
47
+
48
+ *Required*
49
+
50
+ value.
51
+
52
+
53
+ ### NaturalNumberString.zero_or_positive_integer_string?(value) -> boolean
54
+
55
+ #### value
56
+
57
+ *Required*
58
+
59
+ value.
60
+
13
61
 
14
62
  ## Changelog
15
63
 
data/changelog.md CHANGED
@@ -1,3 +1,9 @@
1
+ <a name="0.3.1"></a>
2
+ ## [0.3.1](https://github.com/packsaddle/ruby-natural_number_string/compare/v0.3.0...v0.3.1) (2015-09-26)
3
+
4
+ Update document.
5
+
6
+
1
7
  <a name="0.3.0"></a>
2
8
  # [0.3.0](https://github.com/packsaddle/ruby-natural_number_string/compare/v0.2.1...v0.3.0) (2015-09-26)
3
9
 
@@ -1,3 +1,3 @@
1
1
  module NaturalNumberString
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -10,9 +10,9 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['o.gata.ken@gmail.com']
11
11
 
12
12
  spec.summary =
13
- 'Check the string is a natural number?'
13
+ 'Check the string is a natural number.'
14
14
  spec.description =
15
- 'Check the string is a natural number?'
15
+ 'Check the string is a natural number.'
16
16
  spec.homepage =
17
17
  'https://github.com/packsaddle/ruby-natural_number_string'
18
18
  spec.license = 'MIT'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: natural_number_string
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: Check the string is a natural number?
55
+ description: Check the string is a natural number.
56
56
  email:
57
57
  - o.gata.ken@gmail.com
58
58
  executables: []
@@ -101,5 +101,5 @@ rubyforge_project:
101
101
  rubygems_version: 2.4.5
102
102
  signing_key:
103
103
  specification_version: 4
104
- summary: Check the string is a natural number?
104
+ summary: Check the string is a natural number.
105
105
  test_files: []