Class: Fatty::Ansi::Style
- Inherits:
-
Struct
- Object
- Struct
- Fatty::Ansi::Style
- Defined in:
- lib/fatty/ansi.rb
Instance Attribute Summary collapse
-
#bg ⇒ Object
Returns the value of attribute bg.
-
#bold ⇒ Object
Returns the value of attribute bold.
-
#fg ⇒ Object
Returns the value of attribute fg.
-
#italic ⇒ Object
Returns the value of attribute italic.
-
#reverse ⇒ Object
Returns the value of attribute reverse.
-
#strike ⇒ Object
Returns the value of attribute strike.
-
#underline ⇒ Object
Returns the value of attribute underline.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#bg ⇒ Object
Returns the value of attribute bg
38 39 40 |
# File 'lib/fatty/ansi.rb', line 38 def bg @bg end |
#bold ⇒ Object
Returns the value of attribute bold
38 39 40 |
# File 'lib/fatty/ansi.rb', line 38 def bold @bold end |
#fg ⇒ Object
Returns the value of attribute fg
38 39 40 |
# File 'lib/fatty/ansi.rb', line 38 def fg @fg end |
#italic ⇒ Object
Returns the value of attribute italic
38 39 40 |
# File 'lib/fatty/ansi.rb', line 38 def italic @italic end |
#reverse ⇒ Object
Returns the value of attribute reverse
38 39 40 |
# File 'lib/fatty/ansi.rb', line 38 def reverse @reverse end |
#strike ⇒ Object
Returns the value of attribute strike
38 39 40 |
# File 'lib/fatty/ansi.rb', line 38 def strike @strike end |
#underline ⇒ Object
Returns the value of attribute underline
38 39 40 |
# File 'lib/fatty/ansi.rb', line 38 def underline @underline end |
Class Method Details
.default ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/fatty/ansi.rb', line 69 def self.default new( fg: nil, bg: nil, bold: false, italic: false, underline: false, strike: false, reverse: false, ) end |
Instance Method Details
#dup ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/fatty/ansi.rb', line 48 def dup self.class.new( fg: fg, bg: bg, bold: bold, italic: italic, underline: underline, strike: strike, reverse: reverse, ) end |
#normalize! ⇒ Object
60 61 62 63 64 65 66 67 |
# File 'lib/fatty/ansi.rb', line 60 def normalize! self.bold = !!bold self.italic = !!italic self.underline = !!underline self.strike = !!strike self.reverse = !!reverse self end |