Class: RubyAnything::PromptWindow

Inherits:
BaseWindow show all
Defined in:
lib/ruby-anything/windows/prompt_window.rb

Constant Summary

Constants inherited from BaseWindow

BaseWindow::KEYS

Instance Attribute Summary

Attributes inherited from BaseWindow

#cursor, #top

Instance Method Summary collapse

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_collectionObject



9
# File 'lib/ruby-anything/windows/prompt_window.rb', line 9

def view_collection; [ @prompt ] end