class RatatuiRuby::Constraint
Defines constraints for layout sections or table columns.
- type
-
The type of constraint (:length, :percentage, :min).
- value
-
The numeric value associated with the constraint.
Public Class Methods
Source
# File lib/ratatui_ruby/schema/constraint.rb, line 15 def self.length(v) new(type: :length, value: v) end
- v
-
The length value in cells.
Source
# File lib/ratatui_ruby/schema/constraint.rb, line 29 def self.min(v) new(type: :min, value: v) end
Creates a minimum size constraint.
- v
-
The minimum number of cells.
Source
# File lib/ratatui_ruby/schema/constraint.rb, line 22 def self.percentage(v) new(type: :percentage, value: v) end
Creates a percentage constraint (portion of available space).
- v
-
The percentage value (0-100).