Method: HighLine::ColorScheme#to_hash

Defined in:
lib/highline/color_scheme.rb

#to_hashHash

Retrieve the color scheme hash (in original definition format)

Returns:

  • (Hash)

    scheme as Hash. It may be reused in a new ColorScheme.



105
106
107
108
109
110
# File 'lib/highline/color_scheme.rb', line 105

def to_hash
  @scheme.each_with_object({}) do |pair, hsh|
    key, value = pair
    hsh[key] = value.list
  end
end