Class: Iterm2mintty::MinttyTheme
- Defined in:
- lib/iterm2mintty/mintty_theme.rb
Instance Attribute Summary
Attributes inherited from Theme
Instance Method Summary collapse
- #component_to_config(component) ⇒ Object
- #key_for(component_class) ⇒ Object
- #output ⇒ Object
- #output_lines ⇒ Object
Methods inherited from Theme
Constructor Details
This class inherits a constructor from Iterm2mintty::Theme
Instance Method Details
#component_to_config(component) ⇒ Object
15 16 17 |
# File 'lib/iterm2mintty/mintty_theme.rb', line 15 def component_to_config(component) "#{key_for(component.class)}= #{component.red}, #{component.green}, #{component.blue}" end |
#key_for(component_class) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/iterm2mintty/mintty_theme.rb', line 19 def key_for(component_class) { BlackComponent => "Black", RedComponent => "Red", GreenComponent => "Green", YellowComponent => "Yellow", BlueComponent => "Blue", MagentaComponent => "Magenta", CyanComponent => "Cyan", WhiteComponent => "White", BoldBlackComponent => "BoldBlack", BoldRedComponent => "BoldRed", BoldGreenComponent => "BoldGreen", BoldYellowComponent => "BoldYellow", BoldBlueComponent => "BoldBlue", BoldMagentaComponent => "BoldMagenta", BoldCyanComponent => "BoldCyan", BoldWhiteComponent => "BoldWhite", BGColorComponent => "BackgroundColour", FGColorComponent => "ForegroundColour", CursorColorComponent => "CursorColour", }[component_class] end |
#output ⇒ Object
5 6 7 |
# File 'lib/iterm2mintty/mintty_theme.rb', line 5 def output output_lines.join("\n") + "\n" end |
#output_lines ⇒ Object
9 10 11 12 13 |
# File 'lib/iterm2mintty/mintty_theme.rb', line 9 def output_lines components.map do |component| component_to_config(component) end end |