view_component_reflex 3.3.11 → 3.3.12

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: 66a0225dccbc3322e26185994160ecd2dad4c589718241be92ae9753f98f90f1
4
- data.tar.gz: 7e9eecd26517012019e428286f0879723890d965d52eedd20805d537c59894fe
3
+ metadata.gz: 0b70948aa0b5a3f2180be72f0649398dc22096189f38d26a7ffbf18d30944999
4
+ data.tar.gz: d7f0080cfad13e801d30c79b3886d686d98ad025958c5454374c2541d28e5236
5
5
  SHA512:
6
- metadata.gz: be07fb9df8268c0511297c9b0b1c3e2be9dde2c4f9bcd80d1a9ff222c0719215a77d8f1965ce2a0f00b6e0fc7a8d9ae24d5dbc9f0872a17158e8982e28698998
7
- data.tar.gz: 155b0d69d9dfabd95131c1335ab39e1998400fc9debc32b4856bf73a8cff9dca6e68c83a7c012dd32719079d277076a2bde769c1b5ffc3b86ee31e86c277447d
6
+ metadata.gz: 85cf2658d9f2d73b2e9994497ff31a06009d91fb65bdd3327497d108026332bda876054e5485ef36f1075aa0ebe8d1f483f77cb05d7552f1bcb0b57faa9f3d0d
7
+ data.tar.gz: ba74b77b06516184b60c4766bb0e9a352b34dc824fab66cb2be6d479bd94267c29573972dc0fb654e05132eb399a468ce05fb2743ed8441702d237386226c124
@@ -34,12 +34,24 @@ module ViewComponentReflex
34
34
  @reflex_instance ||= build_reflex_instance
35
35
  end
36
36
 
37
+ def reflex_methods
38
+ arr = []
39
+ current_class = @component
40
+ loop do
41
+ arr += current_class.instance_methods
42
+ current_class = current_class.superclass
43
+ break if current_class == ViewComponentReflex::Component || current_class.nil?
44
+ end
45
+ arr -= ViewComponentReflex::Component.instance_methods
46
+ arr -= [:call, :"_call_#{@component.name.underscore}"]
47
+ arr
48
+ end
49
+
37
50
  ##
38
51
  # Beyond just creating the <Component>Reflex class, we need to define all the component methods on the reflex
39
52
  # class.
40
53
  # This replaces the old method_missing implementation, and passes more strict validation of recent SR versions
41
54
  def build_reflex_instance
42
- reflex_methods = @component.instance_methods - @component.superclass.instance_methods - [:call, :"_call_#{@component.name.underscore}"]
43
55
  component_allocate = @component.allocate
44
56
  Class.new(@component.reflex_base_class).tap do |klass|
45
57
  klass.instance_variable_set(:@__method_parameters, {})
@@ -1,3 +1,3 @@
1
1
  module ViewComponentReflex
2
- VERSION = '3.3.11'
2
+ VERSION = '3.3.12'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component_reflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.11
4
+ version: 3.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua LeBlanc