Class: Marvi::Span
- Inherits:
-
Object
- Object
- Marvi::Span
- Defined in:
- lib/marvi/document.rb
Instance Attribute Summary collapse
-
#bg_color ⇒ Object
readonly
Returns the value of attribute bg_color.
-
#bold ⇒ Object
readonly
Returns the value of attribute bold.
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#italic ⇒ Object
readonly
Returns the value of attribute italic.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text:, bold: false, italic: false, color: nil, bg_color: nil) ⇒ Span
constructor
A new instance of Span.
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_color ⇒ Object (readonly)
Returns the value of attribute bg_color.
5 6 7 |
# File 'lib/marvi/document.rb', line 5 def bg_color @bg_color end |
#bold ⇒ Object (readonly)
Returns the value of attribute bold.
5 6 7 |
# File 'lib/marvi/document.rb', line 5 def bold @bold end |
#color ⇒ Object (readonly)
Returns the value of attribute color.
5 6 7 |
# File 'lib/marvi/document.rb', line 5 def color @color end |
#italic ⇒ Object (readonly)
Returns the value of attribute italic.
5 6 7 |
# File 'lib/marvi/document.rb', line 5 def italic @italic end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/marvi/document.rb', line 5 def text @text end |