Module: MonoclePrint
- Included in:
- Graphics, OutputDevice, Presentation, SingleLine, Table, Table::Column, Table::Member, Table::Segments, Text
- Defined in:
- lib/monocle-print/terminal-escapes.rb,
lib/monocle-print.rb,
lib/monocle-print/list.rb,
lib/monocle-print/table.rb,
lib/monocle-print/utils.rb,
lib/monocle-print/atomic.rb,
lib/monocle-print/layout.rb,
lib/monocle-print/geometry.rb,
lib/monocle-print/graphics.rb,
lib/monocle-print/progress.rb,
lib/monocle-print/presentation.rb,
lib/monocle-print/table/column.rb,
lib/monocle-print/output-device.rb,
lib/monocle-print/table/members.rb,
lib/monocle-print/table/segments.rb
Overview
require ‘termios’ require ‘terminfo’
Defined Under Namespace
Modules: Presentation, TerminalEscapes, Utils
Classes: ColumnLayout, Flow, Graphics, Horizontal, Layout, List, OutputDevice, Pager, Pair, Progress, Rectangle, SingleLine, Table, Text, Vertical
Constant Summary
collapse
- VERSION =
'1.0.1'
- MULTIBYTE_CHARACTER =
%r<
[\xC2-\xDF][\x80-\xBF]
| [\xE0-\xEF][\x80-\xBF]{2}
| [\xF0-\xF4][\x80-\xBF]{3}
>x
- ONE_BYTE =
0x20 .. 0x7E
- TWO_BYTES =
0xC2 .. 0xDF
- THREE_BYTES =
0xE0 .. 0xEF
- FOUR_BYTES =
0xF0 .. 0xF4
- COLOR_ESCAPE =
/\e\[[\d:;]*?m/
Class Method Summary
collapse
Class Method Details
.included(kl) ⇒ Object
11
12
13
14
|
# File 'lib/monocle-print.rb', line 11
def self.included( kl )
super
kl.extend( self )
end
|
.library_path(*args) ⇒ Object
16
17
18
|
# File 'lib/monocle-print.rb', line 16
def self.library_path( *args )
File.join( File.dirname( __FILE__ ), *args )
end
|
.Line(obj) ⇒ Object
26
27
28
|
# File 'lib/monocle-print.rb', line 26
def Line( obj )
SingleLine === obj ? obj : SingleLine.new( obj.to_s )
end
|
.stdout ⇒ Object
20
21
22
|
# File 'lib/monocle-print.rb', line 20
def self.stdout
Output( $stdout )
end
|
.Text(obj) ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/monocle-print.rb', line 34
def Text( obj )
case obj
when Text then obj
when nil then Text.new( '' )
else Text.new( obj.to_s )
end
end
|
.version ⇒ Object
7
8
9
|
# File 'lib/monocle-print.rb', line 7
def self.version
VERSION
end
|