Class: OTerm::Output

Inherits:
VT100
  • Object
show all
Defined in:
lib/oterm/output.rb

Constant Summary

Constants inherited from VT100

VT100::BAR, VT100::BLACK, VT100::BLANK, VT100::BLUE, VT100::CHECKER, VT100::CR, VT100::CROSS, VT100::CYAN, VT100::DASH1, VT100::DASH3, VT100::DASH5, VT100::DASH7, VT100::DASH9, VT100::DEGREE, VT100::DIAMOND, VT100::DOT, VT100::ESC, VT100::FF, VT100::GREEN, VT100::GTE, VT100::HT, VT100::LEFT_T, VT100::LF, VT100::LOW_LEFT, VT100::LOW_RIGHT, VT100::LOW_T, VT100::LTE, VT100::MAGENTA, VT100::MAX_DIM, VT100::NE, VT100::NL, VT100::PI, VT100::PLUS_MINUS, VT100::RED, VT100::RIGHT_T, VT100::UP_LEFT, VT100::UP_RIGHT, VT100::UP_T, VT100::VT, VT100::WHITE, VT100::YELLOW

Instance Attribute Summary

Attributes inherited from VT100

#con

Instance Method Summary collapse

Methods inherited from VT100

#absolute_origin, #attrs_off, #big_bottom, #big_top, #blink, #bold, #clear_line, #clear_screen, #clear_to_end, #clear_to_start, #default_font, #dim, #down, #frame, #get_cursor, #graphic_font, #home, #identify, #invisible, #is_vt100?, #left, #narrow, #recv_wait, #relative_origin, #reset, #restore_cursor, #reverse, #right, #save_cursor, #screen_size, #scroll, #set_colors, #set_cursor, #underline, #up, #wide

Constructor Details

#initialize(con) ⇒ Output

Returns a new instance of Output.



5
6
7
# File 'lib/oterm/output.rb', line 5

def initialize(con)
  super(con)
end

Instance Method Details

#crObject



27
28
29
# File 'lib/oterm/output.rb', line 27

def cr()
  @con.print("\r")
end

#p(str) ⇒ Object



15
16
17
# File 'lib/oterm/output.rb', line 15

def p(str)
  @con.print(str)
end

#pc(c) ⇒ Object



19
20
21
# File 'lib/oterm/output.rb', line 19

def pc(c)
  @con.putc(c)
end

#pl(line = '') ⇒ Object



23
24
25
# File 'lib/oterm/output.rb', line 23

def pl(line='')
  @con.puts(line + "\r")
end

#promptObject



9
10
11
12
13
# File 'lib/oterm/output.rb', line 9

def prompt()
  dim()
  @con.print("\r> ")
  attrs_off()
end