class Cell

Attributes

brush[R]
text[R]

Public Class Methods

new(text, brush) click to toggle source
# File lib/asciinema/cell.rb, line 9
def initialize(text, brush)
  @text = text
  @brush = brush
end

Public Instance Methods

==(other) click to toggle source
# File lib/asciinema/cell.rb, line 18
def ==(other)
  text == other.text && brush == other.brush
end
[](*args) click to toggle source
# File lib/asciinema/cell.rb, line 22
def [](*args)
  self.class.new(text[*args], brush)
end
as_json(*) click to toggle source
# File lib/asciinema/cell.rb, line 26
def as_json(*)
  [text, brush.as_json]
end
empty?() click to toggle source
# File lib/asciinema/cell.rb, line 14
def empty?
  text.blank? && brush.default?
end
to_f() click to toggle source
# File lib/asciinema/cell.rb, line 30
def to_f
  size
end