serega 0.1.0 → 0.1.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
  SHA256:
3
- metadata.gz: ac327fb1d98a08b76fcdfdc68166265bea134f298892f0a2f9b1a25c7d1e6063
4
- data.tar.gz: 9843b54690c3ab5e4c4ad0c651e5e7629915eb502a0913520cec9153e6ebfa9f
3
+ metadata.gz: d35551791e1f846527be7fa3176db641f292dae4e5d8108464e52af67cd5025d
4
+ data.tar.gz: 729261f9aa1a2734e40390ea0a253bd7e931a7bd31665cbd7846394b51042fa4
5
5
  SHA512:
6
- metadata.gz: 7260b7ff2a939f93510565e50a19e6ad3c4fe6899c8ddb927938714bf422d0faedab7e62c638f18e98af13b6f9403cd30d4d72088dd6209f083ad4338f4d64da
7
- data.tar.gz: b54726235c873c143fc3458837f1ecce05ffa26229d37e6b7420b304b8f1bff3bdde9e4a73fcd91c0e19664918cd2080d708e105398d4d30f15e6b440a7d737f
6
+ metadata.gz: 878c59b774c71dabfe9ebf745a0349ebd25fb329e44cd9cba53e2f405844e6639d6f153813e0c475fc03f158b5c04a3fdfad4f41c952d1cd4afcddaed251fbcb
7
+ data.tar.gz: 4fac4c3293292a6644c2976cfbb65ba91c2b8aa0ed8dddd5e24b3ac9ed01b9c954973cce94095a63c377c373f3a26c0ac6ee397109b5f79414f1ef6b0e066632
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -2,9 +2,9 @@
2
2
 
3
3
  class Serega
4
4
  class Attribute
5
- class CheckOptMethod
5
+ class CheckOptKey
6
6
  #
7
- # Checks attribute :method option
7
+ # Checks attribute :key option
8
8
  #
9
9
  # @param opts [Hash] Attribute options
10
10
  #
@@ -13,12 +13,12 @@ class Serega
13
13
  # @return [void]
14
14
  #
15
15
  def self.call(opts)
16
- return unless opts.key?(:method)
16
+ return unless opts.key?(:key)
17
17
 
18
- value = opts[:method]
18
+ value = opts[:key]
19
19
  return if value.is_a?(String) || value.is_a?(Symbol)
20
20
 
21
- raise Error, "Invalid option :method => #{value.inspect}. Must be a String or a Symbol"
21
+ raise Error, "Invalid option :key => #{value.inspect}. Must be a String or a Symbol"
22
22
  end
23
23
  end
24
24
  end
@@ -24,7 +24,7 @@ class Serega
24
24
 
25
25
  def check_each_opt(opts)
26
26
  CheckOptHide.call(opts)
27
- CheckOptMethod.call(opts)
27
+ CheckOptKey.call(opts)
28
28
  CheckOptMany.call(opts)
29
29
  CheckOptSerializer.call(opts)
30
30
  end
data/lib/serega.rb CHANGED
@@ -27,7 +27,7 @@ require_relative "serega/validations/check_opt_is_hash"
27
27
  require_relative "serega/validations/attribute/check_block"
28
28
  require_relative "serega/validations/attribute/check_name"
29
29
  require_relative "serega/validations/attribute/check_opt_hide"
30
- require_relative "serega/validations/attribute/check_opt_method"
30
+ require_relative "serega/validations/attribute/check_opt_key"
31
31
  require_relative "serega/validations/attribute/check_opt_many"
32
32
  require_relative "serega/validations/attribute/check_opt_serializer"
33
33
  require_relative "serega/validations/attribute/check_opts"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serega
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Glushkov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-08 00:00:00.000000000 Z
11
+ date: 2022-07-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -57,8 +57,8 @@ files:
57
57
  - lib/serega/validations/attribute/check_block.rb
58
58
  - lib/serega/validations/attribute/check_name.rb
59
59
  - lib/serega/validations/attribute/check_opt_hide.rb
60
+ - lib/serega/validations/attribute/check_opt_key.rb
60
61
  - lib/serega/validations/attribute/check_opt_many.rb
61
- - lib/serega/validations/attribute/check_opt_method.rb
62
62
  - lib/serega/validations/attribute/check_opt_serializer.rb
63
63
  - lib/serega/validations/attribute/check_opts.rb
64
64
  - lib/serega/validations/check_allowed_keys.rb