lib/peeky/renderer/method_call_minimum_params_render.rb
# Render the a method call with minimal parameters
Render the a method call with minimal parameters
Render the a method call with minimal parameters
def render
        name = method_signature.name
        minimal_call_parameters = method_signature
                                  .parameters
                                  .map(&:minimal_call_format)
                                  .reject { |minimal_call| minimal_call.nil? || minimal_call.strip.empty? }
                                  .join(', ')
        params = minimal_call_parameters.length.zero? ? '' : "(#{minimal_call_parameters})"
        return "#{@instance_name}.#{name}#{params}" unless @instance_name.nil?
        return "#{@class_name}.#{name}#{params}" unless @class_name.nil?
        "#{name}#{params}"
      end
def render name = method_signature . name minimal_call_parameters = method_signature . parameters . map ( & :minimal_call_format ) . reject { | minimal_call | minimal_call . nil? || minimal_call . strip . empty? } . join ( ', ' ) params = minimal_call_parameters . length . zero? ? '' : "(#{minimal_call_parameters})" return "#{@instance_name}.#{name}#{params}" unless @instance_name . nil? return "#{@class_name}.#{name}#{params}" unless @class_name . nil? "#{name}#{params}" end
Render the a method call with minimal parameters
Render the a method call with minimal parameters