draper 4.0.2 → 4.0.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.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -2
  3. data/CHANGELOG.md +24 -0
  4. data/README.md +26 -7
  5. data/lib/draper/automatic_delegation.rb +14 -4
  6. data/lib/draper/collection_decorator.rb +0 -6
  7. data/lib/draper/compatibility/broadcastable.rb +24 -0
  8. data/lib/draper/compatibility/global_id.rb +9 -5
  9. data/lib/draper/decoratable/collection_proxy.rb +15 -0
  10. data/lib/draper/decoratable.rb +7 -2
  11. data/lib/draper/decorator.rb +2 -18
  12. data/lib/draper/query_methods.rb +1 -1
  13. data/lib/draper/railtie.rb +14 -5
  14. data/lib/draper/version.rb +1 -1
  15. data/lib/draper/view_context/build_strategy.rb +1 -9
  16. data/lib/draper.rb +0 -6
  17. metadata +16 -235
  18. data/.github/PULL_REQUEST_TEMPLATE.md +0 -24
  19. data/.github/workflows/ci.yml +0 -55
  20. data/.gitignore +0 -18
  21. data/Gemfile +0 -24
  22. data/bin/bundle +0 -114
  23. data/bin/rake +0 -29
  24. data/draper.gemspec +0 -34
  25. data/spec/draper/collection_decorator_spec.rb +0 -291
  26. data/spec/draper/configuration_spec.rb +0 -49
  27. data/spec/draper/decoratable/equality_spec.rb +0 -10
  28. data/spec/draper/decoratable_spec.rb +0 -235
  29. data/spec/draper/decorated_association_spec.rb +0 -82
  30. data/spec/draper/decorates_assigned_spec.rb +0 -71
  31. data/spec/draper/decorator_spec.rb +0 -872
  32. data/spec/draper/draper_spec.rb +0 -25
  33. data/spec/draper/factory_spec.rb +0 -247
  34. data/spec/draper/finders_spec.rb +0 -166
  35. data/spec/draper/helper_proxy_spec.rb +0 -61
  36. data/spec/draper/lazy_helpers_spec.rb +0 -21
  37. data/spec/draper/query_methods/load_strategy_spec.rb +0 -26
  38. data/spec/draper/query_methods_spec.rb +0 -70
  39. data/spec/draper/undecorate_chain_spec.rb +0 -20
  40. data/spec/draper/undecorate_spec.rb +0 -19
  41. data/spec/draper/view_context/build_strategy_spec.rb +0 -132
  42. data/spec/draper/view_context_spec.rb +0 -182
  43. data/spec/draper/view_helpers_spec.rb +0 -8
  44. data/spec/dummy/.rspec +0 -2
  45. data/spec/dummy/Rakefile +0 -7
  46. data/spec/dummy/app/assets/config/manifest.js +0 -3
  47. data/spec/dummy/app/controllers/application_controller.rb +0 -2
  48. data/spec/dummy/app/controllers/base_controller.rb +0 -4
  49. data/spec/dummy/app/controllers/localized_urls.rb +0 -5
  50. data/spec/dummy/app/controllers/posts_controller.rb +0 -20
  51. data/spec/dummy/app/decorators/mongoid_post_decorator.rb +0 -4
  52. data/spec/dummy/app/decorators/post_decorator.rb +0 -60
  53. data/spec/dummy/app/helpers/application_helper.rb +0 -5
  54. data/spec/dummy/app/jobs/publish_post_job.rb +0 -7
  55. data/spec/dummy/app/mailers/application_mailer.rb +0 -3
  56. data/spec/dummy/app/mailers/post_mailer.rb +0 -19
  57. data/spec/dummy/app/models/admin.rb +0 -5
  58. data/spec/dummy/app/models/application_record.rb +0 -3
  59. data/spec/dummy/app/models/mongoid_post.rb +0 -5
  60. data/spec/dummy/app/models/post.rb +0 -3
  61. data/spec/dummy/app/models/user.rb +0 -5
  62. data/spec/dummy/app/views/layouts/application.html.erb +0 -11
  63. data/spec/dummy/app/views/post_mailer/decorated_email.html.erb +0 -1
  64. data/spec/dummy/app/views/posts/_post.html.erb +0 -42
  65. data/spec/dummy/app/views/posts/show.html.erb +0 -1
  66. data/spec/dummy/bin/rails +0 -4
  67. data/spec/dummy/config/application.rb +0 -68
  68. data/spec/dummy/config/boot.rb +0 -5
  69. data/spec/dummy/config/database.yml +0 -25
  70. data/spec/dummy/config/environment.rb +0 -5
  71. data/spec/dummy/config/environments/development.rb +0 -35
  72. data/spec/dummy/config/environments/production.rb +0 -59
  73. data/spec/dummy/config/environments/test.rb +0 -35
  74. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  75. data/spec/dummy/config/initializers/draper.rb +0 -3
  76. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  77. data/spec/dummy/config/initializers/inflections.rb +0 -15
  78. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  79. data/spec/dummy/config/initializers/secret_token.rb +0 -8
  80. data/spec/dummy/config/initializers/session_store.rb +0 -8
  81. data/spec/dummy/config/locales/en.yml +0 -5
  82. data/spec/dummy/config/mongoid.yml +0 -142
  83. data/spec/dummy/config/routes.rb +0 -9
  84. data/spec/dummy/config/storage.yml +0 -7
  85. data/spec/dummy/config.ru +0 -4
  86. data/spec/dummy/db/migrate/20121019115657_create_posts.rb +0 -8
  87. data/spec/dummy/db/schema.rb +0 -21
  88. data/spec/dummy/db/seeds.rb +0 -2
  89. data/spec/dummy/fast_spec/post_decorator_spec.rb +0 -37
  90. data/spec/dummy/lib/tasks/test.rake +0 -16
  91. data/spec/dummy/log/.gitkeep +0 -0
  92. data/spec/dummy/public/404.html +0 -26
  93. data/spec/dummy/public/422.html +0 -26
  94. data/spec/dummy/public/500.html +0 -25
  95. data/spec/dummy/public/favicon.ico +0 -0
  96. data/spec/dummy/script/rails +0 -6
  97. data/spec/dummy/spec/decorators/active_model_serializers_spec.rb +0 -12
  98. data/spec/dummy/spec/decorators/devise_spec.rb +0 -55
  99. data/spec/dummy/spec/decorators/helpers_spec.rb +0 -21
  100. data/spec/dummy/spec/decorators/post_decorator_spec.rb +0 -64
  101. data/spec/dummy/spec/decorators/spec_type_spec.rb +0 -7
  102. data/spec/dummy/spec/decorators/view_context_spec.rb +0 -22
  103. data/spec/dummy/spec/jobs/publish_post_job_spec.rb +0 -9
  104. data/spec/dummy/spec/mailers/post_mailer_spec.rb +0 -25
  105. data/spec/dummy/spec/models/application_spec.rb +0 -7
  106. data/spec/dummy/spec/models/mongoid_post_spec.rb +0 -8
  107. data/spec/dummy/spec/models/post_spec.rb +0 -15
  108. data/spec/dummy/spec/shared_examples/decoratable.rb +0 -22
  109. data/spec/dummy/spec/spec_helper.rb +0 -8
  110. data/spec/dummy/test/decorators/minitest/devise_test.rb +0 -55
  111. data/spec/dummy/test/decorators/minitest/helpers_test.rb +0 -21
  112. data/spec/dummy/test/decorators/minitest/spec_type_test.rb +0 -52
  113. data/spec/dummy/test/decorators/minitest/view_context_test.rb +0 -24
  114. data/spec/dummy/test/decorators/test_unit/devise_test.rb +0 -55
  115. data/spec/dummy/test/decorators/test_unit/helpers_test.rb +0 -21
  116. data/spec/dummy/test/decorators/test_unit/view_context_test.rb +0 -24
  117. data/spec/dummy/test/minitest_helper.rb +0 -2
  118. data/spec/dummy/test/test_helper.rb +0 -3
  119. data/spec/generators/controller/controller_generator_spec.rb +0 -23
  120. data/spec/generators/decorator/decorator_generator_spec.rb +0 -93
  121. data/spec/generators/install/install_generator_spec.rb +0 -19
  122. data/spec/integration/integration_spec.rb +0 -70
  123. data/spec/performance/active_record.rb +0 -4
  124. data/spec/performance/benchmark.rb +0 -55
  125. data/spec/performance/decorators.rb +0 -45
  126. data/spec/performance/models.rb +0 -20
  127. data/spec/spec_helper.rb +0 -50
  128. data/spec/support/dummy_app.rb +0 -85
  129. data/spec/support/matchers/have_text.rb +0 -50
  130. data/spec/support/shared_examples/decoratable_equality.rb +0 -40
  131. data/spec/support/shared_examples/view_helpers.rb +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b009279cf28737a6fcf4027fc26f3dc2a955741c7c5e5d2220c8dcb383490e3
4
- data.tar.gz: 22455a3a7126650483af269d6a0e432a5a4465a59c762518ce78f40bcecb4286
3
+ metadata.gz: 01d36de260431b65888e966e0ae86d336da78fb154c016e3e1871c07db8b1502
4
+ data.tar.gz: 773cef0abfa87de807d460dca408a86d1aa9f34e2e652486c6b242c9819ad178
5
5
  SHA512:
6
- metadata.gz: 2fd6c0b87227c23320e9ee211b4b2001c81cbf76d103a12e5076f427954febdb2d0366d5182f16b27f5155717ad878f08671098f8b1f9986c137ec053e1637bf
7
- data.tar.gz: 260d4eccd57c623c966422cd256ab1485e1ce4bbaea05d2c6f615cdb644ab0147f00e8917b8165eba78651f279b66cde0a13da38b1c5cc9dc6a0e49822db2361
6
+ metadata.gz: bc3e685a475539225c88e1d7cc44575ec5ce59872ddd1babede55eb9a07c323a2fa267e3d35d55d2c009a12948e83273150c132829597c8bc641c99c15445f7b
7
+ data.tar.gz: 37670673d87b1fea1b93bf435756d1ddaee6da897c1f3905c9aaec7c1b7dab6e02cb3ea9c52ab106a98b54c0e254c1f0e2d8fddaab0ba539a8a308b9cbdd58ea
data/.rspec CHANGED
@@ -1,2 +1 @@
1
- --color
2
- --order rand
1
+ --format progress
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Draper Changelog
2
2
 
3
+ ## 4.0.5 - 2025-11-12
4
+
5
+ ### Fixes
6
+ * Remove unused files from package [#945](https://github.com/drapergem/draper/pull/945)
7
+ * Support Rails 8.1 [#949](https://github.com/drapergem/draper/pull/949)
8
+
9
+ ## 4.0.4 - 2025-01-28
10
+
11
+ ### Fixes
12
+ * Fix a `LoadError` caused by a cherry-pick issue in version 4.0.3
13
+
14
+ ## 4.0.3 - 2025-01-27
15
+
16
+ Added support for latest Ruby (upto 3.4) and Rails (upto 8) versions.
17
+
18
+ ### Fixes
19
+ * Fix `CollectionDecorator#respond_to?` for non-ORM collections [#920](https://github.com/drapergem/draper/pull/920)
20
+ * Fix issues with using Draper outside of controller scope [#927](https://github.com/drapergem/draper/pull/927)
21
+ * Fix decoration of AR associations [#932](https://github.com/drapergem/draper/pull/932)
22
+
23
+ ### Other Changes
24
+ * Improve performance of delegation via `delegate_all` [#911](https://github.com/drapergem/draper/pull/911)
25
+ * Improve README [#878](https://github.com/drapergem/draper/pull/878), [#922](https://github.com/drapergem/draper/pull/922), [#934](https://github.com/drapergem/draper/pull/934)
26
+
3
27
  ## 4.0.2 - 2021-05-27
4
28
 
5
29
  ### Fixes
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Draper: View Models for Rails
2
2
 
3
- [![Actions Status](https://github.com/drapergem/draper/workflows/CI/badge.svg?branch=master)](https://github.com/drapergem/draper/actions?query=workflow%3Aci+branch%3Amaster)
4
- [![Code Climate](https://codeclimate.com/github/drapergem/draper.svg)](https://codeclimate.com/github/drapergem/draper)
5
- [![Test Coverage](https://api.codeclimate.com/v1/badges/0d40c43951d516bf6985/test_coverage)](https://codeclimate.com/github/drapergem/draper/test_coverage)
3
+ [![Actions Status](https://github.com/drapergem/draper/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/drapergem/draper/actions?query=workflow%3Aci+branch%3Amaster)
6
4
  [![Inline docs](http://inch-ci.org/github/drapergem/draper.svg?branch=master)](http://inch-ci.org/github/drapergem/draper)
7
5
 
8
6
  Draper adds an object-oriented layer of presentation logic to your Rails
@@ -131,6 +129,17 @@ class ArticleDecorator < Draper::Decorator
131
129
  end
132
130
  ```
133
131
 
132
+
133
+ To decorate a model in a namespace e.g. `Admin::Catalogue` place the decorator under the
134
+ directory `app/decorators/admin` in the same way you would with views and models.
135
+
136
+ ```ruby
137
+ # app/decorators/admin/catalogue_decorator.rb
138
+ class Admin::CatalogueDecorator < Draper::Decorator
139
+ # ...
140
+ end
141
+ ```
142
+
134
143
  ### Generators
135
144
 
136
145
  To create an `ApplicationDecorator` that all generated decorators inherit from, run...
@@ -155,6 +164,15 @@ rails generate decorator Article
155
164
 
156
165
  ...to create the `ArticleDecorator`.
157
166
 
167
+ If you don't want Rails to generate decorator files when generating a new controller,
168
+ you can add the following configuration to your `config/application.rb` file:
169
+
170
+ ```ruby
171
+ config.generators do |g|
172
+ g.decorator false
173
+ end
174
+ ```
175
+
158
176
  ### Accessing Helpers
159
177
 
160
178
  Normal Rails helpers are still useful for lots of tasks. Both Rails' provided
@@ -652,9 +670,8 @@ you can include this module manually.
652
670
  [Active Job](http://edgeguides.rubyonrails.org/active_job_basics.html) allows you to pass ActiveRecord
653
671
  objects to background tasks directly and performs the necessary serialization and deserialization. In
654
672
  order to do this, arguments to a background job must implement [Global ID](https://github.com/rails/globalid).
655
- Decorated objects implement Global ID by delegating to the object they are decorating. This means
656
- you can pass decorated objects to background jobs, however, the object won't be decorated when it is
657
- deserialized.
673
+ Decorators implement Global ID.
674
+ This means you can pass decorated objects to background jobs, and get them just as decorated when deserialized.
658
675
 
659
676
  ## Contributors
660
677
 
@@ -664,7 +681,8 @@ great community of open source
664
681
 
665
682
  ### Current maintainers
666
683
 
667
- * Cliff Braton (cliff.braton@gmail.com)
684
+ * Alexander Senko (Alexander.Senko@gmail.com)
685
+ * Yuji Yaginuma (yuuji.yaginuma@gmail.com)
668
686
 
669
687
  ### Historical maintainers
670
688
 
@@ -673,3 +691,4 @@ great community of open source
673
691
  * Vasiliy Ermolovich
674
692
  * Andrew Haines
675
693
  * Sean Linsley
694
+ * Cliff Braton (cliff.braton@gmail.com)
@@ -18,11 +18,21 @@ module Draper
18
18
  super || delegatable?(method)
19
19
  end
20
20
 
21
- # @private
22
- def delegatable?(method)
23
- return if private_methods(false).include?(method)
21
+ # The inherit argument for `private_method_defined?` is supported since Ruby 2.6.
22
+ if RUBY_VERSION >= "2.6"
23
+ # @private
24
+ def delegatable?(method)
25
+ return if self.class.private_method_defined?(method, false)
24
26
 
25
- object.respond_to?(method)
27
+ object.respond_to?(method)
28
+ end
29
+ else
30
+ # @private
31
+ def delegatable?(method)
32
+ return if private_methods(false).include?(method)
33
+
34
+ object.respond_to?(method)
35
+ end
26
36
  end
27
37
 
28
38
  module ClassMethods
@@ -61,12 +61,6 @@ module Draper
61
61
 
62
62
  alias :decorated_with? :instance_of?
63
63
 
64
- def kind_of?(klass)
65
- decorated_collection.kind_of?(klass) || super
66
- end
67
-
68
- alias_method :is_a?, :kind_of?
69
-
70
64
  def replace(other)
71
65
  decorated_collection.replace(other)
72
66
  self
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Draper
4
+ module Compatibility
5
+ # It would look consistent to use decorated objects inside templates broadcasted with
6
+ # Turbo::Broadcastable.
7
+ #
8
+ # This compatibility patch fixes the issue by overriding the original defaults to decorate the
9
+ # object, that's passed to the partial in a local variable.
10
+ module Broadcastable
11
+ private
12
+
13
+ def broadcast_rendering_with_defaults(options)
14
+ return super unless decorator_class?
15
+
16
+ # Add the decorated current instance into the locals (see original method for details).
17
+ options[:locals] =
18
+ (options[:locals] || {}).reverse_merge!(model_name.element.to_sym => decorate)
19
+
20
+ super
21
+ end
22
+ end
23
+ end
24
+ end
@@ -5,17 +5,21 @@ module Draper
5
5
  # and deserialization. In order to do this, arguments to a background job must implement
6
6
  # [Global ID](https://github.com/rails/globalid).
7
7
  #
8
- # This compatibility patch implements Global ID for decorated objects by delegating to the object
9
- # that is decorated. This means you can pass decorated objects to background jobs, but
10
- # the object won't be decorated when it is deserialized. This patch is meant as an intermediate
11
- # fix until we can find a way to deserialize the decorated object correctly.
8
+ # This compatibility patch implements Global ID for decorated objects by defining `.find(id)`
9
+ # class method that uses the original one and decorates the result.
10
+ # This means you can pass decorated objects to background jobs and they will be decorated when
11
+ # deserialized.
12
12
  module GlobalID
13
13
  extend ActiveSupport::Concern
14
14
 
15
15
  included do
16
16
  include ::GlobalID::Identification
17
+ end
17
18
 
18
- delegate :to_global_id, :to_signed_global_id, to: :object
19
+ class_methods do
20
+ def find(*args)
21
+ object_class.find(*args).decorate
22
+ end
19
23
  end
20
24
  end
21
25
  end
@@ -0,0 +1,15 @@
1
+ module Draper
2
+ module Decoratable
3
+ module CollectionProxy
4
+ # Decorates a collection of objects. Used at the end of a scope chain.
5
+ #
6
+ # @example
7
+ # company.products.popular.decorate
8
+ # @param [Hash] options
9
+ # see {Decorator.decorate_collection}.
10
+ def decorate(options = {})
11
+ decorator_class.decorate_collection(load_target, options.reverse_merge(with: nil))
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,4 +1,5 @@
1
1
  require 'draper/decoratable/equality'
2
+ require 'draper/compatibility/broadcastable'
2
3
 
3
4
  module Draper
4
5
  # Provides shortcuts to decorate objects directly, so you can do
@@ -11,6 +12,12 @@ module Draper
11
12
  extend ActiveSupport::Concern
12
13
  include Draper::Decoratable::Equality
13
14
 
15
+ autoload :CollectionProxy, 'draper/decoratable/collection_proxy'
16
+
17
+ included do
18
+ prepend Draper::Compatibility::Broadcastable if defined? Turbo::Broadcastable
19
+ end
20
+
14
21
  # Decorates the object using the inferred {#decorator_class}.
15
22
  # @param [Hash] options
16
23
  # see {Decorator#initialize}
@@ -87,8 +94,6 @@ module Draper
87
94
  def ===(other)
88
95
  super || (other.is_a?(Draper::Decorator) && super(other.object))
89
96
  end
90
-
91
97
  end
92
-
93
98
  end
94
99
  end
@@ -33,7 +33,7 @@ module Draper
33
33
  options.assert_valid_keys(:context)
34
34
  @object = object
35
35
  @context = options.fetch(:context, {})
36
- handle_multiple_decoration(options) if object.instance_of?(self.class)
36
+ handle_multiple_decoration(options) if object.is_a?(Draper::Decorator)
37
37
  end
38
38
 
39
39
  class << self
@@ -185,22 +185,6 @@ module Draper
185
185
  self.class.hash ^ object.hash
186
186
  end
187
187
 
188
- # Checks if `self.kind_of?(klass)` or `object.kind_of?(klass)`
189
- #
190
- # @param [Class] klass
191
- def kind_of?(klass)
192
- super || object.kind_of?(klass)
193
- end
194
-
195
- alias :is_a? :kind_of?
196
-
197
- # Checks if `self.instance_of?(klass)` or `object.instance_of?(klass)`
198
- #
199
- # @param [Class] klass
200
- def instance_of?(klass)
201
- super || object.instance_of?(klass)
202
- end
203
-
204
188
  delegate :to_s
205
189
 
206
190
  # In case object is nil
@@ -267,7 +251,7 @@ module Draper
267
251
  if object.applied_decorators.last == self.class
268
252
  @context = object.context unless options.has_key?(:context)
269
253
  @object = object.object
270
- else
254
+ elsif object.applied_decorators.include?(self.class)
271
255
  warn "Reapplying #{self.class} decorator to target that is already decorated with it. Call stack:\n#{caller(1).join("\n")}"
272
256
  end
273
257
  end
@@ -10,7 +10,7 @@ module Draper
10
10
  end
11
11
 
12
12
  def respond_to_missing?(method, include_private = false)
13
- strategy.allowed?(method) || super
13
+ object.respond_to?(method) && strategy.allowed?(method) || super
14
14
  end
15
15
 
16
16
  private
@@ -33,10 +33,14 @@ module Draper
33
33
  end
34
34
 
35
35
  initializer 'draper.setup_orm' do
36
- [:active_record, :mongoid].each do |orm|
37
- ActiveSupport.on_load orm do
38
- Draper.setup_orm self
39
- end
36
+ ActiveSupport.on_load :active_record do
37
+ include Draper::Decoratable
38
+
39
+ ActiveRecord::Associations::CollectionProxy.include Draper::Decoratable::CollectionProxy
40
+ end
41
+
42
+ ActiveSupport.on_load :mongoid do
43
+ include Draper::Decoratable
40
44
  end
41
45
  end
42
46
 
@@ -52,7 +56,12 @@ module Draper
52
56
  Draper::ViewContext.build
53
57
  end
54
58
 
55
- console { initialize_view_context }
59
+ console do
60
+ initialize_view_context
61
+ if ActiveSupport.gem_version >= Gem::Version.new('8.1.0')
62
+ ActiveSupport::ExecutionContext.nestable = false
63
+ end
64
+ end
56
65
 
57
66
  runner { initialize_view_context }
58
67
 
@@ -1,3 +1,3 @@
1
1
  module Draper
2
- VERSION = '4.0.2'
2
+ VERSION = '4.0.5'
3
3
  end
@@ -38,17 +38,9 @@ module Draper
38
38
  def controller
39
39
  Draper::ViewContext.controller ||= Draper.default_controller.new
40
40
  Draper::ViewContext.controller.tap do |controller|
41
- controller.request ||= new_test_request controller if defined?(ActionController::TestRequest)
41
+ controller.request ||= ActionDispatch::TestRequest.create
42
42
  end
43
43
  end
44
-
45
- def new_test_request(controller)
46
- is_above_rails_5_1 ? ActionController::TestRequest.create(controller) : ActionController::TestRequest.create
47
- end
48
-
49
- def is_above_rails_5_1
50
- ActionController::TestRequest.method(:create).parameters.first == [:req, :controller_class]
51
- end
52
44
  end
53
45
  end
54
46
  end
data/lib/draper.rb CHANGED
@@ -51,12 +51,6 @@ module Draper
51
51
  end
52
52
  end
53
53
 
54
- def self.setup_orm(base)
55
- base.class_eval do
56
- include Draper::Decoratable
57
- end
58
- end
59
-
60
54
  class UninferrableDecoratorError < NameError
61
55
  def initialize(klass)
62
56
  super("Could not infer a decorator for #{klass}.")