Module: Beni::DSL

Defined in:
lib/beni/dsl.rb,
lib/beni/dsl/context.rb,
lib/beni/dsl/target_context.rb,
lib/beni/dsl/definition_context.rb,
sig/beni/dsl.rbs,
sig/beni/dsl/context.rbs,
sig/beni/dsl/target_context.rbs,
sig/beni/dsl/definition_context.rbs

Overview

Declarative configuration vocabulary for Beni::Tasks. Three contexts each expose exactly the declarations legal at their position — top level (+Context+), inside a target block (+TargetContext+), and inside a toolchain definition block (+DefinitionContext+) — so a malformed declaration fails in the method itself, at definition time.

Defined Under Namespace

Classes: Context, DefinitionContext, TargetContext

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.assert_known_toolchain!(name) ⇒ Object

A toolchain name outside the Vendor registry fails at the declaration that names it, never mid-build.

Raises:



15
16
17
18
19
# File 'lib/beni/dsl.rb', line 15

def assert_known_toolchain!(name)
  return if Vendor::TOOLCHAIN_FACTORIES.key?(name)

  raise Error, "unknown toolchain #{name.inspect} (known: #{Vendor::TOOLCHAIN_FACTORIES.keys.join(", ")})"
end

Instance Method Details

#self?.assert_known_toolchain!void

This method returns an undefined value.

Parameters:

  • name (String)


3
# File 'sig/beni/dsl.rbs', line 3

def self?.assert_known_toolchain!: (String name) -> void