Module: ConvenientService::Standard

Defined in:
lib/convenient_service/service/configs/aliases.rb,
lib/convenient_service/service/configs/standard/aliases.rb

Overview

Intermediate module to access ConvenientService::Standard::Config by the end-users.

Since:

  • 1.0.0

Defined Under Namespace

Modules: V1

Constant Summary collapse

Config =
Note:

See ConvenientService::Standard::Config.default_options for default options.

Note:

See ConvenientService::Standard::Config.available_options for all available options.

Convenient Service main entrypoint.

Examples:

Allows to define services.

class Service
  include ConvenientService::Standard::Config

  def result
    success
  end
end

Can be customized by with, without, with_defaults, without_defaults options.

class Service
  include ConvenientService::Standard::Config
    .with(:fault_tolerance)
    .without(:short_syntax)

  def result
    success
  end
end

Can be tested in RSpec.

RSpec.describe Service do
  include ConvenientService::RSpec::Matchers::IncludeConfig

  specify { expect(Service).to include_module(ConvenientService::Config.with(:fault_tolerance).without(:short_syntax)) }
end

Since:

  • 1.0.0

::ConvenientService::Service::Configs::Standard