Class: ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::Matcher::Commands::GeneratePrintableMethod
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::Matcher::Commands::GeneratePrintableMethod
- Defined in:
- lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/commands/generate_printable_method.rb
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #call ⇒ Object
- #initialize(object:, method:) ⇒ void constructor
Methods inherited from Support::Command
Constructor Details
#initialize(object:, method:) ⇒ void
29 30 31 32 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/commands/generate_printable_method.rb', line 29 def initialize(object:, method:) @object = object @method = method end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
22 23 24 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/commands/generate_printable_method.rb', line 22 def method @method end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
16 17 18 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/commands/generate_printable_method.rb', line 16 def object @object end |
Instance Method Details
#call ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/matcher/commands/generate_printable_method.rb', line 34 def call case Utils::Object.resolve_type(object) when "class", "module" "#{object}.#{method}" when "instance" "#{object.class}##{method}" end end |