class Pastel::ColorResolver

@api private
Used internally by {Delegator}.
Contains logic for resolving styles applied to component

def initialize(color)

Other tags:
    Api: - private

Parameters:
  • color (Color) --
def initialize(color)
  @color = color
end

def resolve(base, unprocessed_string)

Other tags:
    Api: - private
def resolve(base, unprocessed_string)
  if base.to_a.last == :detach
    Detached.new(color, *base.to_a[0...-1])
  else
    color.decorate(unprocessed_string, *base)
  end
end