Class: UnderOs::UI::Label
- Inherits:
-
View
- Object
- View
- UnderOs::UI::Label
- Defined in:
- lib/under_os/ui/label.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Label
constructor
A new instance of Label.
- #text ⇒ Object
- #text=(text) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Label
Returns a new instance of Label.
4 5 6 7 8 9 10 11 12 |
# File 'lib/under_os/ui/label.rb', line 4 def initialize(={}) super self.text = .delete(:text) || '' @_.sizeToFit @_.numberOfLines = 1; @_.adjustsFontSizeToFitWidth = true; end |
Instance Method Details
#text ⇒ Object
14 15 16 |
# File 'lib/under_os/ui/label.rb', line 14 def text @_.text end |
#text=(text) ⇒ Object
18 19 20 |
# File 'lib/under_os/ui/label.rb', line 18 def text=(text) @_.text = text end |