We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b8cf779 + ed27575 commit 0dfe7acCopy full SHA for 0dfe7ac
lib/grape_entity/exposure/nesting_exposure/nested_exposures.rb
@@ -28,15 +28,25 @@ def clear
28
@exposures.clear
29
end
30
31
- delegate :each,
32
- :to_ary, :to_a,
33
- :[],
34
- :==,
35
- :size,
36
- :count,
37
- :length,
38
- :empty?,
39
- to: :@exposures
+ [
+ :each,
+ :to_ary, :to_a,
+ :all?,
+ :select,
+ :each_with_object,
+ :[],
+ :==,
+ :size,
40
+ :count,
41
+ :length,
42
+ :empty?
43
+ ].each do |name|
44
+ class_eval <<-RUBY, __FILE__, __LINE__
45
+ def #{name}(*args, &block)
46
+ @exposures.#{name}(*args, &block)
47
+ end
48
+ RUBY
49
50
51
# Determine if we have any nesting exposures with the same name.
52
def deep_complex_nesting?
0 commit comments