Class: ConvenientService::Support::DependencyContainer::Commands::AssertValidScope
- Inherits:
-
Command
- Object
- Command
- ConvenientService::Support::DependencyContainer::Commands::AssertValidScope
- Defined in:
- lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb
Instance Attribute Summary collapse
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
- #call ⇒ void
- #initialize(scope:) ⇒ void constructor
Methods inherited from Command
Constructor Details
#initialize(scope:) ⇒ void
18 19 20 |
# File 'lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb', line 18 def initialize(scope:) @scope = scope end |
Instance Attribute Details
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
12 13 14 |
# File 'lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb', line 12 def scope @scope end |
Instance Method Details
#call ⇒ void
This method returns an undefined value.
26 27 28 |
# File 'lib/convenient_service/support/dependency_container/commands/assert_valid_scope.rb', line 26 def call ::ConvenientService.raise Exceptions::InvalidScope.new(scope: scope) unless Constants::SCOPES.include?(scope) end |