Class: Beni::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/beni/configuration.rb,
sig/beni/configuration.rbs

Overview

Resolution output of the Tasks DSL — immutable, defaults applied. The only input the task-definition phase reads: vendor_dir fully resolved (declaration > BENI_VENDOR_DIR > vendor/), build_config as an absolute path or nil for mruby's untouched upstream default, targets as the declared set (or ["host"]), and toolchains as the reference-driven selection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.

Parameters:

  • vendor_dir: (String)
  • build_config: (String, nil)
  • targets: (Array[String])
  • toolchains: (Array[SelectedToolchain])


8
# File 'sig/beni/configuration.rbs', line 8

def initialize: (vendor_dir: String, build_config: String?, targets: Array[String], toolchains: Array[SelectedToolchain]) -> void

Instance Attribute Details

#build_configString? (readonly)

Returns the value of attribute build_config.

Returns:

  • (String, nil)


4
5
6
# File 'sig/beni/configuration.rbs', line 4

def build_config
  @build_config
end

#targetsArray[String] (readonly)

Returns the value of attribute targets.

Returns:

  • (Array[String])


5
6
7
# File 'sig/beni/configuration.rbs', line 5

def targets
  @targets
end

#toolchainsArray[SelectedToolchain] (readonly)

Returns the value of attribute toolchains.

Returns:



6
7
8
# File 'sig/beni/configuration.rbs', line 6

def toolchains
  @toolchains
end

#vendor_dirString (readonly)

Returns the value of attribute vendor_dir.

Returns:

  • (String)


3
4
5
# File 'sig/beni/configuration.rbs', line 3

def vendor_dir
  @vendor_dir
end

Instance Method Details

#mruby_versionString

mruby's selected version. Resolution always selects mruby and leads the toolchain set with it, so it is the head's version.

Returns:

  • (String)


13
14
15
# File 'lib/beni/configuration.rb', line 13

def mruby_version
  toolchains.first.version
end