Class: ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::Delegation
- Inherits:
-
Object
- Object
- ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::Delegation
- Defined in:
- lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb
Instance Attribute Summary collapse
- #arguments ⇒ Object readonly private
- #method ⇒ Object readonly private
- #object ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Boolean private
- #initialize(object:, method:, args:, kwargs:, block:) ⇒ void constructor private
- #with_arguments? ⇒ Booleam private
- #without_arguments? ⇒ Boolean private
Constructor Details
#initialize(object:, method:, args:, kwargs:, block:) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 47 48 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb', line 44 def initialize(object:, method:, args:, kwargs:, block:) @object = object @method = method @arguments = Support::Arguments.new(*args, **kwargs, &block) end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb', line 16 def arguments @arguments end |
#method ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb', line 24 def method @method end |
#object ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb', line 32 def object @object end |
Instance Method Details
#==(other) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
74 75 76 77 78 79 80 81 82 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb', line 74 def ==(other) return unless other.instance_of?(self.class) return false if object != other.object return false if method != other.method return false if arguments != other.arguments true end |
#with_arguments? ⇒ Booleam
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
55 56 57 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb', line 55 def with_arguments? arguments.any? end |
#without_arguments? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
64 65 66 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/delegation.rb', line 64 def without_arguments? !with_arguments? end |