Sha256: 231ede90bd48b674acf595097b607e77c95458f49f6543bedf4ce310a96d0de3

Contents?: true

Size: 668 Bytes

Versions: 55

Compression:

Stored size: 668 Bytes

Contents

# @@colors
desc 'List available color variables for configuration templates and views'
command :colors do |c|
  c.action do |_global_options, _options, _args|
    bgs = []
    fgs = []
    @colors::attributes.each do |color|
      colname = color.to_s
      colname << " (#{color.to_s.sub(/bold/, 'bright')})" if colname =~ /bold/
      if color.to_s =~ /bg/
        bgs.push("#{@colors.send(color, "    ")}#{@colors.default} <-- #{colname}")
      else
        fgs.push("#{@colors.send(color, "XXXX")}#{@colors.default} <-- #{colname}")
      end
    end
    out = []
    out << fgs.join("\n")
    out << bgs.join("\n")
    Doing::Pager.page out.join("\n")
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
doing-2.1.88 bin/commands/colors.rb
doing-2.1.87 bin/commands/colors.rb
doing-2.1.86 bin/commands/colors.rb
doing-2.1.85 bin/commands/colors.rb
doing-2.1.84 bin/commands/colors.rb
doing-2.1.83 bin/commands/colors.rb
doing-2.1.82 bin/commands/colors.rb
doing-2.1.81 bin/commands/colors.rb
doing-2.1.80 bin/commands/colors.rb
doing-2.1.79 bin/commands/colors.rb
doing-2.1.78 bin/commands/colors.rb
doing-2.1.77 bin/commands/colors.rb
doing-2.1.76 bin/commands/colors.rb
doing-2.1.75 bin/commands/colors.rb
doing-2.1.74 bin/commands/colors.rb
doing-2.1.73 bin/commands/colors.rb
doing-2.1.72 bin/commands/colors.rb
doing-2.1.69 bin/commands/colors.rb
doing-2.1.68 bin/commands/colors.rb
doing-2.1.66 bin/commands/colors.rb