shape_of 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/shape_of.rb +6 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d29d9baae8a0e917051667ba6d9526372191522dc82a75e06fc17171b8809526
4
- data.tar.gz: 0c242d2d00c3acf7f690b178760ca164f01b45c8d782145004ee3972d1cd25cd
3
+ metadata.gz: 200845fd006ae0119d06f0b1f3f8b7b908a7c3d8f8c16ebe4856bcb905af5763
4
+ data.tar.gz: f046ee908eb3715e8028484dac72fa0fa411f24496ad3d71d8c984cf1a33fd7b
5
5
  SHA512:
6
- metadata.gz: 170be793850595786dddbd03fafa7244e68aa7a19aee1757bbe439b4169cc9ea2e612371231c9e331a61d814dfae94afa0149afd2d3f754b542a7e01b4b790e1
7
- data.tar.gz: 859512b4a374791f987296f27b774c5b9ac7fa5833505a3abff4ff72cc9942d6c0c8ff226daff3a7ea7dcef81fce80f31b3b3b1f7bc2d307e8491dae736dab67
6
+ metadata.gz: f9d8e53319be78d4f3cf0aa6cc94f19f89c25decc737fecd1d16ce6e4666f35b80bca6ee9aff753ada64e85aa9d8c829cb4af06d67b33c114033c6f57838258a
7
+ data.tar.gz: d70f5abeb46bd372329189755f901f5d56fa0e9d7d07d3a6724404719844c08ae4792042e6eaf417051e0bf33183f66f23fe29369003eefc0d6f7879157f9756
data/lib/shape_of.rb CHANGED
@@ -89,11 +89,11 @@ module ShapeOf
89
89
  module Assertions
90
90
  def assert_shape_of(object, shape)
91
91
  if shape.respond_to? :shape_of?
92
- assert shape.shape_of? object
92
+ assert_operator shape, :shape_of?, object
93
93
  elsif shape.instance_of? ::Array
94
- assert Array[shape.first].shape_of? object
94
+ assert_operator Array[shape.first], :shape_of?, object
95
95
  elsif shape.instance_of? ::Hash
96
- assert Hash[shape].shape_of? object
96
+ assert_operator Hash[shape], :shape_of?, object
97
97
  else
98
98
  raise TypeError, "Expected #{Shape.inspect}, an #{::Array.inspect}, or a #{::Hash.inspect} as the shape"
99
99
  end
@@ -101,11 +101,11 @@ module ShapeOf
101
101
 
102
102
  def refute_shape_of(object, shape)
103
103
  if shape.respond_to? :shape_of?
104
- refute shape.shape_of? object
104
+ refute_operator shape, :shape_of?, object
105
105
  elsif shape.instance_of? ::Array
106
- refute Array[shape.first].shape_of? object
106
+ refute_operator Array[shape.first], :shape_of?, object
107
107
  elsif shape.instance_of? ::Hash
108
- refute Hash[shape].shape_of? object
108
+ refute_operator Hash[shape], :shape_of?, object
109
109
  else
110
110
  raise TypeError, "Expected #{Shape.inspect}, an #{::Array.inspect}, or a #{::Hash.inspect} as the shape"
111
111
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shape_of
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Isom