Module: Isna::Format
- Included in:
- String
- Defined in:
- lib/isna/format.rb
Instance Attribute Summary collapse
-
#isna_format ⇒ Object
Returns the value of attribute isna_format.
Instance Method Summary collapse
- #change_background(number) ⇒ Object
- #change_color(number) ⇒ Object
- #change_type(number) ⇒ Object
- #closing ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#isna_format ⇒ Object
Returns the value of attribute isna_format.
5 6 7 |
# File 'lib/isna/format.rb', line 5 def isna_format @isna_format end |
Instance Method Details
#change_background(number) ⇒ Object
15 16 17 |
# File 'lib/isna/format.rb', line 15 def change_background number @isna_format[2] = number; self end |
#change_color(number) ⇒ Object
11 12 13 |
# File 'lib/isna/format.rb', line 11 def change_color number @isna_format[1] = number; self end |
#change_type(number) ⇒ Object
7 8 9 |
# File 'lib/isna/format.rb', line 7 def change_type number @isna_format[0] = number; self end |
#closing ⇒ Object
23 24 25 |
# File 'lib/isna/format.rb', line 23 def closing "[0m" end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/isna/format.rb', line 19 def to_s "[%s;%s;%sm" % @isna_format end |