Class: Plushie::Configuration
- Inherits:
-
Object
- Object
- Plushie::Configuration
- Defined in:
- lib/plushie.rb
Overview
Global configuration for the Plushie SDK.
Instance Attribute Summary collapse
-
#artifacts ⇒ Array<Symbol>
Which artifacts to install with download/build tasks.
-
#bin_file ⇒ String?
Override destination path for the native binary.
-
#binary_path ⇒ String?
Explicit path to the plushie binary.
-
#build_name ⇒ String
Custom binary name for extension builds.
-
#extension_config ⇒ Hash
Runtime configuration map passed to widget extensions via the Settings wire message.
-
#extensions ⇒ Array<Class>
Extension classes to include in custom builds.
-
#source_path ⇒ String?
Path to the plushie Rust source checkout.
-
#test_backend ⇒ Symbol?
Test backend (:mock, :headless, :windowed).
-
#wasm_dir ⇒ String?
Override output directory for WASM renderer files.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/plushie.rb', line 189 def initialize @binary_path = nil @source_path = nil @build_name = "plushie-custom" @extensions = [] @extension_config = {} @test_backend = nil @artifacts = [:bin] @bin_file = nil @wasm_dir = nil end |
Instance Attribute Details
#artifacts ⇒ Array<Symbol>
Which artifacts to install with download/build tasks. Default: +[:bin]+. Set to +[:bin, :wasm]+ for projects that need both the native binary and the WASM renderer.
175 176 177 |
# File 'lib/plushie.rb', line 175 def artifacts @artifacts end |
#bin_file ⇒ String?
Override destination path for the native binary. Used by +rake plushie:download+ and +rake plushie:build+. Env var +PLUSHIE_BIN_FILE+ takes precedence.
181 182 183 |
# File 'lib/plushie.rb', line 181 def bin_file @bin_file end |
#binary_path ⇒ String?
Explicit path to the plushie binary. Overrides all resolution. Equivalent to PLUSHIE_BINARY_PATH env var.
144 145 146 |
# File 'lib/plushie.rb', line 144 def binary_path @binary_path end |
#build_name ⇒ String
Custom binary name for extension builds. Defaults to "plushie-custom". Used as the Cargo binary target name and the installed filename.
155 156 157 |
# File 'lib/plushie.rb', line 155 def build_name @build_name end |
#extension_config ⇒ Hash
Runtime configuration map passed to widget extensions via the Settings wire message. Keyed by extension config_key.
164 165 166 |
# File 'lib/plushie.rb', line 164 def extension_config @extension_config end |
#extensions ⇒ Array<Class>
Extension classes to include in custom builds.
159 160 161 |
# File 'lib/plushie.rb', line 159 def extensions @extensions end |
#source_path ⇒ String?
Path to the plushie Rust source checkout. Used by rake plushie:build.
Equivalent to PLUSHIE_SOURCE_PATH env var.
149 150 151 |
# File 'lib/plushie.rb', line 149 def source_path @source_path end |
#test_backend ⇒ Symbol?
Test backend (:mock, :headless, :windowed). Equivalent to PLUSHIE_TEST_BACKEND env var.
169 170 171 |
# File 'lib/plushie.rb', line 169 def test_backend @test_backend end |
#wasm_dir ⇒ String?
Override output directory for WASM renderer files. Used by +rake plushie:download+. Env var +PLUSHIE_WASM_DIR+ takes precedence.
187 188 189 |
# File 'lib/plushie.rb', line 187 def wasm_dir @wasm_dir end |