marameters 0.10.0 → 1.0.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: '09f8116959180daa2b1ac61d0e8b92ba5e5859fc44cdadcef4aaa3686e15a5c6'
4
- data.tar.gz: 3a87c1d82885b8390c17849c48a38ce4541f818a4ea3d51e4c223e449cd88e6f
3
+ metadata.gz: '0239bc01a276d9772d90353fad489b7028ad67af2453952b79c8900216be0d87'
4
+ data.tar.gz: 849864aa69885987aa60c17ec2f7b05e7dd37520b47b6f84afc1b3df8cc75942
5
5
  SHA512:
6
- metadata.gz: 7f9c1d0796c5b84df75288678b3a4336c1878d4b449247bf161a8f0ebf09699462db385a43cbfdac11d0e08dc716afa8fc3cca5d1538f9421dfa601abbc85a43
7
- data.tar.gz: a6d9ce536adcb82d3f2014d0187f1a3758e942ded308b585be347f0f0916e8a0f6f822dec8e79b0a522aad4da96e2fe4dc6a359bb695f5747cdeb2d2edf7e117
6
+ metadata.gz: d26d64a6e4d0e228cb909f1f76bcfedfa0eebb71f1621581fed7bf7c3d19c8eb3fce57d8574d148ae1be8130347c19f4f63352d72eaafca3c504cffea959b209
7
+ data.tar.gz: 1e713d605fbc0a6acce595f9425f082d1729741a4a601aa1ba857e548a74d4ba81a0df9de210d1a131dd3b3c51063c48ac4b084420802a2fc936500fe1f55bb5
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -44,7 +44,7 @@ gem "marameters"
44
44
 
45
45
  == Usage
46
46
 
47
- At a high level, you can use `Marameters` as a single object interface for accessing all capabilities provided by this gem. Here's an overview:
47
+ At a high level, you can use `Marameters` as a single Object API for accessing all capabilities provided by this gem. Here's an overview:
48
48
 
49
49
  [source,ruby]
50
50
  ----
@@ -63,7 +63,7 @@ Marameters.categorize parameters, arguments
63
63
 
64
64
  Marameters.of self, :demo # []
65
65
 
66
- probe = Marameters.probe parameters
66
+ probe = Marameters.for parameters
67
67
  probe.to_a # [[:req, :one], [:opt, :two], [:key, :three]]
68
68
  probe.positionals # [:one, :two]
69
69
  probe.keywords # [:three]
@@ -79,7 +79,7 @@ Read on to learn more about the details on how each of these methods work and th
79
79
 
80
80
  === Probe
81
81
 
82
- The probe allows you to analyze a method's parameters. To understand how, consider the following demonstration class:
82
+ The probe allows you to analyze a method's parameters. To understand how, consider the following:
83
83
 
84
84
  [source,ruby]
85
85
  ----
@@ -45,11 +45,18 @@ module Marameters
45
45
 
46
46
  def names = parameters.map { |_kind, name| name }
47
47
 
48
- def only_bare_splats? = (parameters in [[:rest]] | [[:keyrest]] | [[:rest], [:keyrest]])
48
+ def only_bare_splats?
49
+ parameters in [[:rest]] \
50
+ | [[:keyrest]] \
51
+ | [[:rest], [:keyrest]] \
52
+ | [[:rest, :*]] \
53
+ | [[:keyrest, :**]] \
54
+ | [[:rest, :*], [:keyrest, :**]]
55
+ end
49
56
 
50
- def only_double_splats? = (parameters in [[:keyrest, *]])
57
+ def only_double_splats? = (parameters in [[:keyrest]] | [[:keyrest, *]])
51
58
 
52
- def only_single_splats? = (parameters in [[:rest, *]])
59
+ def only_single_splats? = (parameters in [[:rest]] | [[:rest, *]])
53
60
 
54
61
  def positionals? = positionals.any?
55
62
 
data/lib/marameters.rb CHANGED
@@ -10,7 +10,7 @@ module Marameters
10
10
 
11
11
  def self.of(...) = Probe.of(...)
12
12
 
13
- def self.probe(...) = Probe.new(...)
13
+ def self.for(...) = Probe.new(...)
14
14
 
15
15
  def self.signature(...) = Signature.new(...)
16
16
  end
data/marameters.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "marameters"
5
- spec.version = "0.10.0"
5
+ spec.version = "1.0.1"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://www.alchemists.io/projects/marameters"
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.signing_key = Gem.default_key_path
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
- spec.required_ruby_version = "~> 3.1"
26
- spec.add_dependency "refinements", "~> 9.7"
25
+ spec.required_ruby_version = "~> 3.2"
26
+ spec.add_dependency "refinements", "~> 10.0"
27
27
  spec.add_dependency "zeitwerk", "~> 2.6"
28
28
 
29
29
  spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marameters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
29
29
  RFE=
30
30
  -----END CERTIFICATE-----
31
- date: 2022-10-22 00:00:00.000000000 Z
31
+ date: 2022-12-27 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: refinements
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '9.7'
39
+ version: '10.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '9.7'
46
+ version: '10.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: zeitwerk
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -96,14 +96,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - "~>"
98
98
  - !ruby/object:Gem::Version
99
- version: '3.1'
99
+ version: '3.2'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.3.24
106
+ rubygems_version: 3.4.1
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Provides dynamic method parameter construction and deconstruction.
metadata.gz.sig CHANGED
Binary file