Sha256: cdb2aa4e469c074f26769ecf84b7868499a7e96397a411fc952d1c209576f712
Contents?: true
Size: 1.35 KB
Versions: 10
Compression:
Stored size: 1.35 KB
Contents
# frozen_string_literal: true module ConvenientService module RSpec module Matchers module Custom class DelegateTo module Entities class Matcher module Commands class GeneratePrintableMethod < Support::Command ## # @!attribute [r] object # @return [Object] Can be any type. # attr_reader :object ## # @!attribute [r] method # @return [Symbol, String] # attr_reader :method ## # @param object [Object] Can by any type. # @param method [Symbol, String] # @return [void] # def initialize(object:, method:) @object = object @method = method end def call case Utils::Object.resolve_type(object) when "class", "module" "#{object}.#{method}" when "instance" "#{object.class}##{method}" end end end end end end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems