Module: Unmagic::Util

Defined in:
lib/unmagic/color/util/percentage.rb

Overview

Utility classes for color manipulation

Defined Under Namespace

Classes: Percentage

Class Method Summary collapse

Class Method Details

.Percentage(*args, **kwargs) ⇒ Percentage?

Constructor-style method for creating Percentage instances

Handles both string parsing and numeric building.

Parameters:

  • args (Array)

    Arguments to pass to Percentage.build

  • kwargs (Hash)

    a customizable set of options

Options Hash (**kwargs):

  • :value (Numeric)

    The percentage value (0-100)

Returns:



266
267
268
# File 'lib/unmagic/color/util/percentage.rb', line 266

def Percentage(*args, **kwargs) # rubocop:disable Naming/MethodName
  Percentage.build(*args, **kwargs)
end