Class: Echoes::Cell
- Inherits:
-
Object
- Object
- Echoes::Cell
- Defined in:
- lib/echoes/cell.rb
Instance Attribute Summary collapse
-
#bg ⇒ Object
Returns the value of attribute bg.
-
#blink ⇒ Object
Returns the value of attribute blink.
-
#bold ⇒ Object
Returns the value of attribute bold.
-
#char ⇒ Object
Returns the value of attribute char.
-
#concealed ⇒ Object
Returns the value of attribute concealed.
-
#faint ⇒ Object
Returns the value of attribute faint.
-
#fg ⇒ Object
Returns the value of attribute fg.
-
#hyperlink ⇒ Object
Returns the value of attribute hyperlink.
-
#inverse ⇒ Object
Returns the value of attribute inverse.
-
#italic ⇒ Object
Returns the value of attribute italic.
-
#multicell ⇒ Object
Returns the value of attribute multicell.
-
#strikethrough ⇒ Object
Returns the value of attribute strikethrough.
-
#underline ⇒ Object
Returns the value of attribute underline.
-
#underline_color ⇒ Object
Returns the value of attribute underline_color.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
- #copy_from(other) ⇒ Object
-
#initialize(char = " ", fg: nil, bg: nil, bold: false, underline: false, inverse: false, width: 1) ⇒ Cell
constructor
A new instance of Cell.
- #reset! ⇒ Object
Constructor Details
#initialize(char = " ", fg: nil, bg: nil, bold: false, underline: false, inverse: false, width: 1) ⇒ Cell
Returns a new instance of Cell.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/echoes/cell.rb', line 7 def initialize(char = " ", fg: nil, bg: nil, bold: false, underline: false, inverse: false, width: 1) @char = char @fg = fg @bg = bg @bold = bold @italic = false @underline = underline @inverse = inverse @faint = false @strikethrough = false @width = width end |
Instance Attribute Details
#bg ⇒ Object
Returns the value of attribute bg.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def bg @bg end |
#blink ⇒ Object
Returns the value of attribute blink.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def blink @blink end |
#bold ⇒ Object
Returns the value of attribute bold.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def bold @bold end |
#char ⇒ Object
Returns the value of attribute char.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def char @char end |
#concealed ⇒ Object
Returns the value of attribute concealed.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def concealed @concealed end |
#faint ⇒ Object
Returns the value of attribute faint.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def faint @faint end |
#fg ⇒ Object
Returns the value of attribute fg.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def fg @fg end |
#hyperlink ⇒ Object
Returns the value of attribute hyperlink.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def hyperlink @hyperlink end |
#inverse ⇒ Object
Returns the value of attribute inverse.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def inverse @inverse end |
#italic ⇒ Object
Returns the value of attribute italic.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def italic @italic end |
#multicell ⇒ Object
Returns the value of attribute multicell.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def multicell @multicell end |
#strikethrough ⇒ Object
Returns the value of attribute strikethrough.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def strikethrough @strikethrough end |
#underline ⇒ Object
Returns the value of attribute underline.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def underline @underline end |
#underline_color ⇒ Object
Returns the value of attribute underline_color.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def underline_color @underline_color end |
#width ⇒ Object
Returns the value of attribute width.
5 6 7 |
# File 'lib/echoes/cell.rb', line 5 def width @width end |
Instance Method Details
#copy_from(other) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/echoes/cell.rb', line 38 def copy_from(other) @char = other.char @fg = other.fg @bg = other.bg @bold = other.bold @italic = other.italic @underline = other.underline @underline_color = other.underline_color @inverse = other.inverse @faint = other.faint @strikethrough = other.strikethrough @blink = other.blink @concealed = other.concealed @hyperlink = other.hyperlink end |
#reset! ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/echoes/cell.rb', line 20 def reset! @char = " " @fg = nil @bg = nil @bold = false @italic = false @underline = false @inverse = false @faint = false @strikethrough = false @blink = false @concealed = false @width = 1 @multicell = nil @hyperlink = nil @underline_color = nil end |