Class: Marvi::Span

Inherits:
Object
  • Object
show all
Defined in:
lib/marvi/document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text:, bold: false, italic: false, color: nil, bg_color: nil) ⇒ Span

Returns a new instance of Span.



7
8
9
10
11
12
13
# File 'lib/marvi/document.rb', line 7

def initialize(text:, bold: false, italic: false, color: nil, bg_color: nil)
  @text = text
  @bold = bold
  @italic = italic
  @color = color
  @bg_color = bg_color
end

Instance Attribute Details

#bg_colorObject (readonly)

Returns the value of attribute bg_color.



5
6
7
# File 'lib/marvi/document.rb', line 5

def bg_color
  @bg_color
end

#boldObject (readonly)

Returns the value of attribute bold.



5
6
7
# File 'lib/marvi/document.rb', line 5

def bold
  @bold
end

#colorObject (readonly)

Returns the value of attribute color.



5
6
7
# File 'lib/marvi/document.rb', line 5

def color
  @color
end

#italicObject (readonly)

Returns the value of attribute italic.



5
6
7
# File 'lib/marvi/document.rb', line 5

def italic
  @italic
end

#textObject (readonly)

Returns the value of attribute text.



5
6
7
# File 'lib/marvi/document.rb', line 5

def text
  @text
end