Class: Luck::CommandBox
- Defined in:
- lib/luck/textbox.rb
Instance Attribute Summary
Attributes inherited from TextBox
#handler, #index, #mask, #multiline
Attributes inherited from Label
Attributes inherited from Control
#display, #pane, #x1, #x2, #y1, #y2
Instance Method Summary collapse
Methods inherited from TextBox
#handle_char, #initialize, #on_submit, #redraw, #text, #value=
Methods inherited from Label
#align, #align_text, #initialize, #redraw
Methods inherited from Control
#focus!, #height, #initialize, #width
Constructor Details
This class inherits a constructor from Luck::TextBox
Instance Method Details
#command? ⇒ Boolean
79 80 81 |
# File 'lib/luck/textbox.rb', line 79 def command? @text[0,1] == '/' end |
#label ⇒ Object
83 84 85 |
# File 'lib/luck/textbox.rb', line 83 def label command? ? 'Command' : @label end |
#value ⇒ Object
87 88 89 |
# File 'lib/luck/textbox.rb', line 87 def value command? ? super[1..-1] : super end |