Class: Thaum::Rendering::Style

Inherits:
Data
  • Object
show all
Defined in:
lib/thaum/rendering/style.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fg: nil, bg: nil, bold: false, italic: false, underline: false, dim: false) ⇒ Style

Returns a new instance of Style.



6
7
8
# File 'lib/thaum/rendering/style.rb', line 6

def initialize(fg: nil, bg: nil, bold: false, italic: false, underline: false, dim: false)
  super
end

Instance Attribute Details

#bgObject (readonly)

Returns the value of attribute bg

Returns:

  • (Object)

    the current value of bg



5
6
7
# File 'lib/thaum/rendering/style.rb', line 5

def bg
  @bg
end

#boldObject (readonly)

Returns the value of attribute bold

Returns:

  • (Object)

    the current value of bold



5
6
7
# File 'lib/thaum/rendering/style.rb', line 5

def bold
  @bold
end

#dimObject (readonly)

Returns the value of attribute dim

Returns:

  • (Object)

    the current value of dim



5
6
7
# File 'lib/thaum/rendering/style.rb', line 5

def dim
  @dim
end

#fgObject (readonly)

Returns the value of attribute fg

Returns:

  • (Object)

    the current value of fg



5
6
7
# File 'lib/thaum/rendering/style.rb', line 5

def fg
  @fg
end

#italicObject (readonly)

Returns the value of attribute italic

Returns:

  • (Object)

    the current value of italic



5
6
7
# File 'lib/thaum/rendering/style.rb', line 5

def italic
  @italic
end

#underlineObject (readonly)

Returns the value of attribute underline

Returns:

  • (Object)

    the current value of underline



5
6
7
# File 'lib/thaum/rendering/style.rb', line 5

def underline
  @underline
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


10
# File 'lib/thaum/rendering/style.rb', line 10

def empty? = !fg && !bg && !bold && !italic && !underline && !dim