Class: ConvenientService::RSpec::Helpers::Classes::WrapMethod
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::RSpec::Helpers::Classes::WrapMethod
- Defined in:
- lib/convenient_service/rspec/helpers/classes/wrap_method.rb,
lib/convenient_service/rspec/helpers/classes/wrap_method/exceptions.rb,
lib/convenient_service/rspec/helpers/classes/wrap_method/entities/wrapped_method.rb
Defined Under Namespace
Modules: Entities, Exceptions
Instance Attribute Summary collapse
-
#entity ⇒ Object
readonly
Returns the value of attribute entity.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#observe_middleware ⇒ Object
readonly
Returns the value of attribute observe_middleware.
Instance Method Summary collapse
- #call ⇒ ConvenientService::RSpec::Helpers::Classes::Entities::WrappedMethod
- #initialize(entity, method, observe_middleware:) ⇒ void constructor
Methods inherited from Support::Command
Constructor Details
#initialize(entity, method, observe_middleware:) ⇒ void
35 36 37 38 39 |
# File 'lib/convenient_service/rspec/helpers/classes/wrap_method.rb', line 35 def initialize(entity, method, observe_middleware:) @entity = entity @method = method @observe_middleware = observe_middleware end |
Instance Attribute Details
#entity ⇒ Object (readonly)
Returns the value of attribute entity.
15 16 17 |
# File 'lib/convenient_service/rspec/helpers/classes/wrap_method.rb', line 15 def entity @entity end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
21 22 23 |
# File 'lib/convenient_service/rspec/helpers/classes/wrap_method.rb', line 21 def method @method end |
#observe_middleware ⇒ Object (readonly)
Returns the value of attribute observe_middleware.
27 28 29 |
# File 'lib/convenient_service/rspec/helpers/classes/wrap_method.rb', line 27 def observe_middleware @observe_middleware end |
Instance Method Details
#call ⇒ ConvenientService::RSpec::Helpers::Classes::Entities::WrappedMethod
44 45 46 |
# File 'lib/convenient_service/rspec/helpers/classes/wrap_method.rb', line 44 def call Entities::WrappedMethod.new(entity: entity, method: method, observe_middleware: observe_middleware) end |