Module: RatatuiRuby::Labs
- Defined in:
- lib/ratatui_ruby/labs.rb,
lib/ratatui_ruby/labs/a11y.rb
Overview
Experimental lab features.
Defined Under Namespace
Modules: A11y
Class Method Summary collapse
-
.enable!(lab) ⇒ Object
Enables a lab programmatically.
-
.enabled?(lab) ⇒ Boolean
Returns whether the specified lab is enabled.
-
.reset! ⇒ Object
Resets all labs (for testing only).
-
.warn_once!(feature_name) ⇒ Object
Emits experimental warning once per session.
Class Method Details
.enable!(lab) ⇒ Object
Enables a lab programmatically.
20 21 22 |
# File 'lib/ratatui_ruby/labs.rb', line 20 def enable!(lab) @enabled_lab = lab.to_sym.downcase end |
.enabled?(lab) ⇒ Boolean
Returns whether the specified lab is enabled.
15 16 17 |
# File 'lib/ratatui_ruby/labs.rb', line 15 def enabled?(lab) @enabled_lab == lab.to_sym.downcase end |
.reset! ⇒ Object
Resets all labs (for testing only).
25 26 27 28 |
# File 'lib/ratatui_ruby/labs.rb', line 25 def reset! @enabled_lab = nil @warned = false end |
.warn_once!(feature_name) ⇒ Object
Emits experimental warning once per session.
31 32 33 34 35 36 |
# File 'lib/ratatui_ruby/labs.rb', line 31 def warn_once!(feature_name) return if @warned RatatuiRuby.warn_experimental_feature(feature_name) @warned = true end |