oh_my_method 0.0.1 → 0.0.2

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: 4d0a0661ff587cca1fd43830b9a13ed3ec4c8713
4
- data.tar.gz: e140ffae935061c94b40d28f1f075f6085313fe1
3
+ metadata.gz: a3bc3302ab1d82a0a3948cb20c6fd3e4fa130c9b
4
+ data.tar.gz: dbd2976ac34ca453f56100fefb7a97656dd9f6bf
5
5
  SHA512:
6
- metadata.gz: c1e957ceb93178e45ced085197eb3e3898e7430cd6beb2fdc74c24364ef3ce3333b90292307886ad13dc3e1688ec04389a2826171aa2ce5b2a43b32b25d9568d
7
- data.tar.gz: ad9c8698ec4feb8d634b097f0648fed6b7b641d801f095d97b4e8d7a055f038a115f079229b46811df6578c896a8aa086af6217c5078a55c618c1be344a1e9c2
6
+ metadata.gz: 0845542bc0c5f0ef6882d8bbd144dfca727222e60d1a3eb1d960b1246ed31552a9a369b44282595a5f8f2806c776bf43cc3982258f46e0e2ec9966545e5e0337
7
+ data.tar.gz: 29be6d29ec4ef5a826175587e7fabe59f7701d5607933bdae2f4cb99c33c288f42a93f9733a628196ac7b63f7839bf08810172b12ba4c1cc98bb1d44f1fc1d45
@@ -0,0 +1,9 @@
1
+ class Integer
2
+ def plus?
3
+ self > 0
4
+ end
5
+
6
+ def minus?
7
+ self < 0
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module OhMyMethod
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/oh_my_method.rb CHANGED
@@ -1 +1,2 @@
1
1
  require "oh_my_method/version"
2
+ require "oh_my_method/integer"
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Integer" do
4
+ it "plus?" do
5
+ expect(-1.plus?).to eq false
6
+ expect(0.plus?).to eq false
7
+ expect(1.plus?).to eq true
8
+ expect((1<<64).plus?).to eq true
9
+ end
10
+
11
+ it "minus?" do
12
+ expect(-1.minus?).to eq true
13
+ expect(0.minus?).to eq false
14
+ expect(1.minus?).to eq false
15
+ expect((1<<64).minus?).to eq false
16
+ end
17
+ end
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oh_my_method
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - siman-man
@@ -51,9 +51,11 @@ files:
51
51
  - README.md
52
52
  - Rakefile
53
53
  - lib/oh_my_method.rb
54
+ - lib/oh_my_method/integer.rb
54
55
  - lib/oh_my_method/version.rb
55
56
  - oh_my_method.gemspec
56
- - spec/oh_my_method.rb
57
+ - spec/oh_my_method/integer_spec.rb
58
+ - spec/spec_helper.rb
57
59
  homepage: https://github.com/siman-man/oh_my_method
58
60
  licenses:
59
61
  - MIT
@@ -79,5 +81,6 @@ signing_key:
79
81
  specification_version: 4
80
82
  summary: Collection of we method.
81
83
  test_files:
82
- - spec/oh_my_method.rb
84
+ - spec/oh_my_method/integer_spec.rb
85
+ - spec/spec_helper.rb
83
86
  has_rdoc: