onyxcord 3.2.4 → 3.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c94582fa63841a78c5b713cc29f26d291c91bb2bfeefedf9c411926cdfc3887f
4
- data.tar.gz: 7cae417909158a1770526f9536934e446a34f593d48d2e2a4a1e906ea300b798
3
+ metadata.gz: 58b6c40e04d80caf8907786964a17a7499074e7f2a213ba0c8d95aa4a7a97617
4
+ data.tar.gz: f5a62bd27e38a81f849b0cdd8e4f3210e73f684775320929a7f01cd963d3b9fc
5
5
  SHA512:
6
- metadata.gz: 8f16620764772170815fdb1d972dfc93aa2cb1be6faa6c557a7820813f4f9bba8cdcf227cd63277243ca05c9ecb32da90ddd49a6e2e1318fe919a41c1cf06f44
7
- data.tar.gz: 3aa37e6eaf9852859dba4aa000c520ed7a4d230931a64f09039ed88016aa33b181de6a4848fe8f378d92f789db1911cb91d496e1f49134ebbdbb8b55b1623658
6
+ metadata.gz: d5fd3b0d1966b6e37b23675bc5ac1948b059cfe9b4777032b5d573c2bb199cf540776291b51c1e92a5e368021e5191d09089cccb18fd6f04e2438c193914b8ac
7
+ data.tar.gz: 3ad8f80253da0da08e946870590bbf10b9ffd70da02fe24f838d67d0bce5d93f58302f03493b7e187fe00a76a36c53d63e4c6cec67e698bbbabba43cd4779a0a
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OnyxCord
4
- VERSION = '3.2.4'
4
+ VERSION = '3.2.5'
5
5
  end
@@ -49,6 +49,12 @@ module OnyxCord
49
49
  class ActionRow
50
50
  include Enumerable
51
51
 
52
+ DELEGATED_COMPONENT_METHODS = %i[
53
+ custom_id
54
+ value
55
+ values
56
+ ].freeze
57
+
52
58
  # @return [Integer] the numeric identifier of the action row.
53
59
  attr_reader :id
54
60
 
@@ -84,6 +90,13 @@ module OnyxCord
84
90
  def to_a
85
91
  @components
86
92
  end
93
+
94
+ DELEGATED_COMPONENT_METHODS.each do |name|
95
+ define_method(name) do
96
+ component = @components.first
97
+ component.public_send(name) if @components.one? && component.respond_to?(name)
98
+ end
99
+ end
87
100
  end
88
101
 
89
102
  # An interactable button component.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onyxcord
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.4
4
+ version: 3.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gustavo Silva