Class: Cliptic::Interface::Logo

Inherits:
Windows::Grid show all
Defined in:
lib/cliptic/interface.rb

Constant Summary

Constants included from Chars

Chars::Block, Chars::HL, Chars::LL, Chars::LS, Chars::LU, Chars::MS, Chars::Nums, Chars::RL, Chars::RS, Chars::RU, Chars::TD, Chars::TL, Chars::TR, Chars::TU, Chars::Tick, Chars::VL, Chars::XX

Instance Attribute Summary collapse

Attributes inherited from Windows::Grid

#cells, #sq

Attributes inherited from Windows::Window

#centered_x, #centered_y, #col, #line, #x, #y

Instance Method Summary collapse

Methods inherited from Windows::Grid

#add_str, #cell

Methods inherited from Windows::Window

#add_str, #bold, #clear, #color, #move, #refresh, #reset_attrs, #reset_pos, #setpos, #standend, #standout, #time_str, #wrap_str

Methods included from Chars

small_num

Constructor Details

#initialize(line:, text: "CLIptic") ⇒ Logo

Returns a new instance of Logo.



35
36
37
38
# File 'lib/cliptic/interface.rb', line 35

def initialize(line:, text:"CLIptic")
  super(y:1, x:text.length, line:line)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



34
35
36
# File 'lib/cliptic/interface.rb', line 34

def text
  @text
end

Instance Method Details

#draw(cp_grid: $colors[:logo_grid], cp_text: $colors[:logo_text], bold: true) ⇒ Object



39
40
41
42
43
44
45
46
# File 'lib/cliptic/interface.rb', line 39

def draw(cp_grid:$colors[:logo_grid], 
         cp_text:$colors[:logo_text], bold:true)
  super(cp:cp_grid)
  bold(bold).color(cp_text)
  add_str(str:text)
  reset_attrs
  refresh
end