class Samantha::Color

Attributes

count[RW]
hex[RW]

Public Class Methods

new(hex) click to toggle source
# File lib/colors.rb, line 6
def initialize(hex)
  @hex = hex
  @count = 1
end

Public Instance Methods

tally() click to toggle source
# File lib/colors.rb, line 11
def tally
  @count += 1
end
to_s() click to toggle source
# File lib/colors.rb, line 15
def to_s
  "#{Paint['●', @hex, nil]} ##{@hex.ljust(6)} #{@count.to_s}"
end