Class: RubyAnything::PromptWindow
- Inherits:
-
BaseWindow
- Object
- BaseWindow
- RubyAnything::PromptWindow
- Defined in:
- lib/ruby-anything/windows/prompt_window.rb
Constant Summary
Constants inherited from BaseWindow
Instance Attribute Summary
Attributes inherited from BaseWindow
Instance Method Summary collapse
- #draw_at(*args) ⇒ Object
-
#initialize(parent, prompt, opt) ⇒ PromptWindow
constructor
A new instance of PromptWindow.
- #view_collection ⇒ Object
Methods inherited from BaseWindow
#before_down, #before_left, #before_right, #before_up, #change_focus_line, #collection, #down, #draw_at!, #enhansive_line, #in_color, #in_pos, #left, #method_missing, #normalize_line, #on_input, #refresh, #right, #up, #update
Constructor Details
#initialize(parent, prompt, opt) ⇒ PromptWindow
Returns a new instance of PromptWindow.
5 6 7 8 |
# File 'lib/ruby-anything/windows/prompt_window.rb', line 5 def initialize(parent, prompt, opt) @prompt = prompt super(parent, opt) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RubyAnything::BaseWindow
Instance Method Details
#draw_at(*args) ⇒ Object
10 11 12 13 14 |
# File 'lib/ruby-anything/windows/prompt_window.rb', line 10 def draw_at(*args) in_color(PROMPT_COLOR) { super(*args) } end |
#view_collection ⇒ Object
9 |
# File 'lib/ruby-anything/windows/prompt_window.rb', line 9 def view_collection; [ @prompt ] end |