Class: Factorix::MODState
- Inherits:
-
Data
- Object
- Data
- Factorix::MODState
- Defined in:
- lib/factorix/mod_state.rb,
lib/factorix/mod_state.rb,
sig/factorix/mod_state.rbs
Overview
Represents the state of a MOD in a MOD list
Instance Attribute Summary collapse
-
#enabled ⇒ Boolean
readonly
Whether the MOD is enabled.
-
#version ⇒ Factorix::MODVersion?
readonly
The version of the MOD, or nil if the version is not specified.
Class Method Summary collapse
Instance Method Summary collapse
-
#enabled? ⇒ Boolean
Check if the MOD is enabled.
-
#initialize(enabled:, version: nil) ⇒ MODState
constructor
Initialize a new MODState.
Constructor Details
#initialize(enabled:, version: nil) ⇒ MODState
Initialize a new MODState
21 |
# File 'lib/factorix/mod_state.rb', line 21 def initialize(enabled:, version: nil) = super |
Instance Attribute Details
#enabled ⇒ Boolean (readonly)
Returns whether the MOD is enabled.
23 24 25 |
# File 'lib/factorix/mod_state.rb', line 23 def enabled @enabled end |
#version ⇒ Factorix::MODVersion? (readonly)
Returns the version of the MOD, or nil if the version is not specified.
26 27 28 |
# File 'lib/factorix/mod_state.rb', line 26 def version @version end |
Class Method Details
.[] ⇒ MODState
14 |
# File 'sig/factorix/mod_state.rbs', line 14
def self.[]: (enabled: bool, ?version: MODVersion?) -> MODState
|
Instance Method Details
#enabled? ⇒ Boolean
Check if the MOD is enabled
32 |
# File 'lib/factorix/mod_state.rb', line 32 def enabled? = enabled |