Class: HighLine::SampleColorScheme

Inherits:
ColorScheme show all
Defined in:
lib/highline/color_scheme.rb

Overview

A sample ColorScheme.

Instance Method Summary collapse

Methods inherited from ColorScheme

#[], #[]=, #definition, #include?, #keys, #load_from_hash, #to_hash

Constructor Details

#initialize(h = nil) ⇒ SampleColorScheme

Builds the sample scheme with settings for :critical, :error, :warning, :notice, :info, :debug, :row_even, and :row_odd colors.


120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/highline/color_scheme.rb', line 120

def initialize( h = nil )
  scheme = {
    :critical => [ :yellow, :on_red  ],
    :error    => [ :bold,   :red     ],
    :warning  => [ :bold,   :yellow  ],
    :notice   => [ :bold,   :magenta ],
    :info     => [ :bold,   :cyan    ],
    :debug    => [ :bold,   :green   ],
    :row_even => [ :cyan    ],
    :row_odd  => [ :magenta ]
  }
  super(scheme)
end