Exception: ConvenientService::Core::Entities::Config::Exceptions::TooManyCommitsFromMethodMissing

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/core/entities/config/exceptions.rb

Overview

Since:

  • 1.0.0

API:

  • public

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(config:) ⇒ void

This method returns an undefined value.

Parameters:

Since:

  • 1.0.0

API:

  • public



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/convenient_service/core/entities/config/exceptions.rb', line 40

def initialize_with_kwargs(config:)
  message = "    `\#{config.klass}` config is committed too many times from `method_missing`.\n\n    In order to resolve this issue try to commit it manually before usage of any config-dependent method.\n\n    Example 1 (outside class):\n\n      # Commitment:\n      \#{config.klass}.commit_config!\n\n      # Few lines later - usage:\n      \#{config.klass}.result # or whatever method.\n\n    Example 2 (inside class):\n\n      class \#{config.klass}\n        # ...\n        commit_config!\n\n        step :result # or any other method that becomes available after config commitment.\n      end\n  TEXT\n\n  initialize(message)\nend\n"