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

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

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