marameters 0.10.0 → 1.0.0

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: 82aa36d02b80fca6ee621275465c9a30c031e6021272e96c54fb033bf92cb7f0
4
+ data.tar.gz: 4f3e57de60b7bf3732a279c12526c64947ff40dad910d2bcbcb85e3d49a3aa6b
5
5
  SHA512:
6
- metadata.gz: 7f9c1d0796c5b84df75288678b3a4336c1878d4b449247bf161a8f0ebf09699462db385a43cbfdac11d0e08dc716afa8fc3cca5d1538f9421dfa601abbc85a43
7
- data.tar.gz: a6d9ce536adcb82d3f2014d0187f1a3758e942ded308b585be347f0f0916e8a0f6f822dec8e79b0a522aad4da96e2fe4dc6a359bb695f5747cdeb2d2edf7e117
6
+ metadata.gz: 2ddf1a3249553afe0b90b75007b2f03abcaab6e38494117b951809524675b8132d63cad70829fb9f606365dd806d2f1f98885a063b848d7d835a723c27345774
7
+ data.tar.gz: 7104d97b6256f74787f8858d8c57ade23735a3a0f9c57c3243fbd9b757f5373779b11262c71b69754f94d26f8a159655607d2dcadec440bd666d4485e4f4f7c7
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
  ----
@@ -34,8 +34,8 @@ module Marameters
34
34
 
35
35
  def filter pair, value
36
36
  case pair
37
- in [:rest] | [:rest, :*] then splat_positional value
38
- in [:keyrest] | [:keyrest, :**] then record.keywords = Hash value
37
+ in [:rest, :*] then splat_positional value
38
+ in [:keyrest, :**] then record.keywords = Hash value
39
39
  in [:req, *] | [:opt, *] then record.positionals.append value
40
40
  in [:rest, *] then record.positionals.append(*value)
41
41
  in [:nokey] then nil
@@ -45,7 +45,9 @@ 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, :*]] | [[:keyrest, :**]] | [[:rest, :*], [:keyrest, :**]]
50
+ end
49
51
 
50
52
  def only_double_splats? = (parameters in [[:keyrest, *]])
51
53
 
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.0"
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.0
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-25 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