Class: Milktea::Text
Overview
Text component for displaying text content with wrapping and truncation
Instance Attribute Summary
Attributes inherited from Container
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Container
child, direction, flex_direction, #initialize
Methods inherited from Model
child, children, #children_views, #initialize, #screen_height, #screen_size, #screen_width, #update, #with
Constructor Details
This class inherits a constructor from Milktea::Container
Instance Method Details
#view ⇒ Object
9 10 11 12 13 14 |
# File 'lib/milktea/text.rb', line 9 def view return "" if content.empty? return render(truncated_lines) if state[:wrap] render_truncated end |