Class: Twterm::Image::Bold
Instance Method Summary
collapse
#!, #-, #at, blank_line, #bold, #brackets, checkbox, #color, #column, cursor, empty, #line, number, #parens, plural, remaining_resource, string, whitespace, #|
Constructor Details
#initialize(image) ⇒ Bold
Returns a new instance of Bold.
4
5
6
|
# File 'lib/twterm/image/bold.rb', line 4
def initialize(image)
@image = image
end
|
Instance Method Details
#height ⇒ Object
8
9
10
|
# File 'lib/twterm/image/bold.rb', line 8
def height
image.height
end
|
#render(window) ⇒ Object
12
13
14
15
16
|
# File 'lib/twterm/image/bold.rb', line 12
def render(window)
window.attron(Curses::A_BOLD)
image.at(line, column).render(window)
window.attroff(Curses::A_BOLD)
end
|
#to_s ⇒ Object
18
19
20
|
# File 'lib/twterm/image/bold.rb', line 18
def to_s
"\e[1m#{image}\e[0m"
end
|
#width ⇒ Object
22
23
24
|
# File 'lib/twterm/image/bold.rb', line 22
def width
image.width
end
|