Class: Tmux::Options::ColorOption Private

Inherits:
SymbolOption show all
Defined in:
lib/tmux/options/color_option.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.

See Also:

Class Method Summary collapse

Methods inherited from SymbolOption

from_tmux

Methods inherited from Option

from_tmux

Class Method Details

.to_tmux(value) ⇒ String

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.

Parameters:

  • value (Symbol<:black, :red, :green, :yellow, :blue, :magenta, :cyan, :white, :colour0 – colour255, :default>)

Returns:

  • (String)

See Also:



13
14
15
16
17
18
19
# File 'lib/tmux/options/color_option.rb', line 13

def to_tmux(value)
  if ![:black, :red, :green, :yellow, :blue, :magenta, :cyan, :white, :default].include?(value) &&
      value !~ /^colour\d+$/
    raise ArgumentError
  end
  super
end