Class: PryTheme::Config::Executor Private
- Inherits:
-
Object
- Object
- PryTheme::Config::Executor
- Defined in:
- lib/pry-theme/config.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Responsible for actions that are defined in theme_options
.
Instance Method Summary collapse
-
#paint_key_as_symbol ⇒ void
private
Sets the colour of the key token to the colour of the symbol token (akin to Pygments).
Instance Method Details
#paint_key_as_symbol ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The method amends the default behaviour of CodeRay.
This method returns an undefined value.
Sets the colour of the key token to the colour of the symbol token (akin to Pygments). Without this patch keys and symbols have generally different colours. It’s impossible to set the colour of the key token, but with help of this method you can make it look like a symbol.
24 25 26 27 |
# File 'lib/pry-theme/config.rb', line 24 def paint_key_as_symbol token_colors = CodeRay::Encoders::Terminal::TOKEN_COLORS token_colors[:key] = token_colors[:symbol] end |