Exception: ConvenientService::Feature::Plugins::CanHaveEntries::Exceptions::NotDefinedEntryMethod

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/feature/plugins/can_have_entries/exceptions.rb

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(name:, feature:) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/convenient_service/feature/plugins/can_have_entries/exceptions.rb', line 9

def initialize_with_kwargs(name:, feature:)
  message = "    Entry for `\#{name}` is registered inside `\#{feature.class}` feature, but its corresponding method is NOT defined.\n\n    Did you forget to define it? For example, using method form:\n\n    class \#{feature.class}\n      entry :\#{name}\n\n      # ...\n\n      def \#{name}(...)\n        # ...\n      end\n\n      # ...\n    end\n\n    Or using block form:\n\n    class \#{feature.class}\n      entry :\#{name} do |*args, **kwargs, &block|\n        # ...\n      end\n\n      # ...\n    end\n  TEXT\n\n  initialize(message)\nend\n"