Module: CapeCod
- Defined in:
- lib/cape-cod.rb,
lib/cape-cod/color.rb,
lib/cape-cod/string.rb,
lib/cape-cod/version.rb
Defined Under Namespace
Modules: String Classes: Color
Constant Summary collapse
- EFFECTS =
{ reset: 0, bold: 1, dark: 2, italic: 3, underline: 4, blink: 5, rapid_blink: 6, negative: 7, concealed: 8, strikethrough: 9 }.freeze
- VERSION =
'0.1.4'
Class Attribute Summary collapse
-
.enabled ⇒ Object
(also: enabled?)
Returns the value of attribute enabled.
Class Method Summary collapse
-
.background(*color, target) ⇒ Object
(also: bg)
:nodoc:.
-
.effect(effect, target) ⇒ Object
(also: fx)
:nodoc:.
-
.foreground(*color, target) ⇒ Object
(also: fg)
:nodoc:.
Class Attribute Details
.enabled ⇒ Object Also known as: enabled?
Returns the value of attribute enabled.
24 25 26 |
# File 'lib/cape-cod.rb', line 24 def enabled @enabled end |
Class Method Details
.background(*color, target) ⇒ Object Also known as: bg
:nodoc:
47 48 49 |
# File 'lib/cape-cod.rb', line 47 def background(*color, target) # :nodoc: apply_escape_sequence(color_code_for(*color, :background), target) end |
.effect(effect, target) ⇒ Object Also known as: fx
:nodoc:
51 52 53 |
# File 'lib/cape-cod.rb', line 51 def effect(effect, target) # :nodoc: apply_escape_sequence(effect_code_for(effect), target) end |
.foreground(*color, target) ⇒ Object Also known as: fg
:nodoc:
43 44 45 |
# File 'lib/cape-cod.rb', line 43 def foreground(*color, target) # :nodoc: apply_escape_sequence(color_code_for(*color, :foreground), target) end |