Class: Tmux::Options::ClockModeStyleOption Private

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

Class Method Details

.from_tmux(value) ⇒ Symbol

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 (String)

    the value to cast

Returns:

  • (Symbol)

See Also:



12
13
14
# File 'lib/tmux/options/clock_mode_style_option.rb', line 12

def from_tmux(value)
  super || {12 => :twelve, 24 => :twenty_four}[value]
end

.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<:twelve, :twenty_four>)

Returns:

  • (String)

Raises:

  • (ArgumentError)

See Also:



20
21
22
23
# File 'lib/tmux/options/clock_mode_style_option.rb', line 20

def to_tmux(value)
  raise ArgumentError unless [:twelve, :twenty_four].include?(value)
  super
end