Sha256: 0a80f76907888add3803ffe63ea98f42c0db3036f3cf66b267ca1ef14d89d1cb

Contents?: true

Size: 972 Bytes

Versions: 2

Compression:

Stored size: 972 Bytes

Contents

# rubocop:disable Naming/UncommunicativeMethodParamName

module NoServiceModule
end

module SpecService
  include Simple::Service

  # This is service1
  #
  # Service 1 has a full description
  def service1(a, b, c = "speed-of-light", d:, e: 2.781); end

  # This is service2 (no full description)
  def service2
    "service2 return"
  end

  def service3
    nil
  end

  private

  def not_a_service; end
end

module InvokeTestService
  include Simple::Service

  def no_params
    "service2 return"
  end

  def positional_params(a, b, c = "speed-of-light", e = 2.781)
    [a, b, c, e]
  end

  def named_params(a:, b:, c: "speed-of-light", e: 2.781)
    [a, b, c, e]
  end

  def mixed_optional_params(a, b = "default-b", c = "speed-of-light", e: 2.781)
    [a, b, c, e]
  end

  def variadic_params(a, b = "queen bee", *args, e: 2.781)
    [a, b, args, e]
  end
end

module SpecTestService
  include Simple::Service

  def foo(bar, baz:)
    [ bar, baz ]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple-service-0.1.6 spec/support/spec_services.rb
simple-service-0.1.5 spec/support/spec_services.rb