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
Methods inherited from LogMode
#<<, #cleanup, #on_kill, #status, #toggle_follow
Methods inherited from TextMode
#<<, #[], #lines, #pipe, #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, #half_page_down, #half_page_up, #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_goto_pos, #search_in_buffer, #search_start_line
Methods inherited from Mode
#blur, #cancel_search!, #cleanup, #draw, #focus, #handle_input, #help_text, #in_search?, keymap, keymaps, #killable?, load_all_modes, make_name, #name, #pipe_to_process, register_keymap, #resize, #resolve_input, #save_to_file, #status, #unsaved?
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 "poll for new messages" end |
Instance Method Details
#poll ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/sup/modes/poll-mode.rb', line 9 def poll unless @new @new = false self << "\n" end self << "Poll started at #{Time.now}\n" PollManager.do_poll { |s| self << (s + "\n") } end |