Class: Stencil::ForegroundColor
- Inherits:
-
TermStyleDirective
- Object
- Directive
- Block
- TermStyleDirective
- Stencil::ForegroundColor
- Defined in:
- lib/stencil/directives/term-style.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from TermStyleDirective
#code_for, #escape_codes, #initialize, #old_style, #render, #style
Methods inherited from Block
#add, #ended, #initialize, #inspect, #parsed, #render
Methods inherited from Directive
#checked_render, create, #initialize, #inspect, #inspect_args, #interpret, #parsed, #postrender, #pre_end, #prerender, register, #render, #render_end
Constructor Details
This class inherits a constructor from Stencil::TermStyleDirective
Instance Method Details
#setup_parameters(color) ⇒ Object
110 111 112 |
# File 'lib/stencil/directives/term-style.rb', line 110 def setup_parameters(color) @color_text = color end |
#update_style(style, state) ⇒ Object
114 115 116 |
# File 'lib/stencil/directives/term-style.rb', line 114 def update_style(style, state) return style.merge(:foreground => interpret(@color_text, state)) end |