Class: Mocktail::StringifiesMethodSignature

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/mocktail/stringifies_method_signature.rb,
lib/mocktail/sorbet/mocktail/stringifies_method_signature.rb

Instance Method Summary collapse

Instance Method Details

#stringify(signature) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/mocktail/stringifies_method_signature.rb', line 5

def stringify(signature)
  positional_params = positional(signature)
  keyword_params = keyword(signature)
  block_param = block(signature)

  "(#{[positional_params, keyword_params, block_param].compact.join(", ")})"
end