Sha256: 3a142e68a6db332e11ff865582be84aded881cf49661ca52febfe4fc8233f63f

Contents?: true

Size: 718 Bytes

Versions: 6

Compression:

Stored size: 718 Bytes

Contents

# frozen_string_literal: true

##
# WIP: Factory API is NOT well-thought yet. It will be revisited and completely refactored at any time.
#
module ConvenientService
  module Factories
    module Arguments
      ##
      # @return [Array]
      #
      # @example Default.
      #
      #   hello(*args)
      #
      def create_args
        [:foo, :bar]
      end

      ##
      # @return [Hash]
      #
      # @example Default.
      #
      #   hello(**kwargs)
      #
      def create_kwargs
        {foo: :bar, baz: :qux}
      end

      ##
      # @return [Hash]
      #
      # @example Default.
      #
      #   hello(&block)
      #
      def create_block
        proc { :foo }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
convenient_service-0.11.0 lib/convenient_service/factories/arguments.rb
convenient_service-0.10.1 lib/convenient_service/factories/arguments.rb
convenient_service-0.10.0 lib/convenient_service/factories/arguments.rb
convenient_service-0.9.0 lib/convenient_service/factories/arguments.rb
convenient_service-0.8.0 lib/convenient_service/factories/arguments.rb
convenient_service-0.7.0 lib/convenient_service/factories/arguments.rb