class Hexdump::Theme::ANSI
Represents an ANSI
control sequence.
@api private
@since 1.0.0
Constants
- PARAMETERS
- RESET
ANSI
reset control sequence
Attributes
parameters[R]
The style name(s).
@return [Symbol, Array<Symbol>] style
string[R]
The ANSI
string.
@return [String]
Public Class Methods
new(parameters)
click to toggle source
Initializes an ANSI
control sequence.
@param [Symbol, Array<Symbol>] style
# File lib/hexdump/theme/ansi.rb, line 57 def initialize(parameters) @parameters = parameters @string = String.new Array(parameters).each do |name| @string << PARAMETERS.fetch(name) do raise(ArgumentError,"unknown ANSI parameter: #{name}") end end end