Class: Muxr::Terminal::Cell

Inherits:
Struct
  • Object
show all
Defined in:
lib/muxr/terminal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attrsObject

Returns the value of attribute attrs

Returns:

  • (Object)

    the current value of attrs



105
106
107
# File 'lib/muxr/terminal.rb', line 105

def attrs
  @attrs
end

#bgObject

Returns the value of attribute bg

Returns:

  • (Object)

    the current value of bg



105
106
107
# File 'lib/muxr/terminal.rb', line 105

def bg
  @bg
end

#charObject

Returns the value of attribute char

Returns:

  • (Object)

    the current value of char



105
106
107
# File 'lib/muxr/terminal.rb', line 105

def char
  @char
end

#fgObject

Returns the value of attribute fg

Returns:

  • (Object)

    the current value of fg



105
106
107
# File 'lib/muxr/terminal.rb', line 105

def fg
  @fg
end

Returns the value of attribute hyperlink

Returns:

  • (Object)

    the current value of hyperlink



105
106
107
# File 'lib/muxr/terminal.rb', line 105

def hyperlink
  @hyperlink
end

Instance Method Details

#copy_from(other) ⇒ Object



114
115
116
117
118
119
120
# File 'lib/muxr/terminal.rb', line 114

def copy_from(other)
  self.char = other.char
  self.fg = other.fg
  self.bg = other.bg
  self.attrs = other.attrs
  self.hyperlink = other.hyperlink
end

#reset!Object



106
107
108
109
110
111
112
# File 'lib/muxr/terminal.rb', line 106

def reset!
  self.char = " "
  self.fg = nil
  self.bg = nil
  self.attrs = 0
  self.hyperlink = nil
end