Class: Redwood::PollMode
- Defined in:
- lib/sup/modes/poll-mode.rb
Constant Summary
Constants inherited from ScrollMode
Instance Attribute Summary
Attributes inherited from TextMode
Attributes inherited from ScrollMode
#botline, #leftcol, #status, #topline
Attributes inherited from Mode
Instance Method Summary collapse
-
#initialize ⇒ PollMode
constructor
A new instance of PollMode.
- #poll ⇒ Object
- #puts(s = "") ⇒ Object
Methods inherited from LogMode
#<<, #status, #text=, #toggle_follow
Methods inherited from TextMode
#<<, #[], #lines, #save_to_disk
Methods inherited from ScrollMode
#at_bottom?, #at_top?, #cancel_search!, #col_left, #col_right, #continue_search_in_buffer, #draw, #ensure_mode_validity, #in_search?, #jump_to_col, #jump_to_end, #jump_to_left, #jump_to_line, #jump_to_start, #line_down, #line_up, #page_down, #page_up, #resize, #rightcol, #search_goto_line, #search_in_buffer, #search_start_line
Methods inherited from Mode
#blur, #cancel_search!, #cleanup, #draw, #focus, #handle_input, #help_text, #in_search?, #killable?, load_all_modes, make_name, #name, register_keymap, #resize, #resolve_input, #save_to_file, #status
Constructor Details
#initialize ⇒ PollMode
Returns a new instance of PollMode.
4 5 6 7 |
# File 'lib/sup/modes/poll-mode.rb', line 4 def initialize @new = true super end |
Instance Method Details
#poll ⇒ Object
13 14 15 16 17 18 |
# File 'lib/sup/modes/poll-mode.rb', line 13 def poll puts unless @new @new = false puts "Poll started at #{Time.now}" PollManager.do_poll { |s| puts s } end |
#puts(s = "") ⇒ Object
9 10 11 |
# File 'lib/sup/modes/poll-mode.rb', line 9 def puts s="" self << s + "\n" end |