class Squib::Args::Paint
Public Class Methods
expanding_parameters()
click to toggle source
# File lib/squib/args/paint.rb, line 25 def self.expanding_parameters parameters.keys # all of them are expandable end
new(custom_colors)
click to toggle source
# File lib/squib/args/paint.rb, line 14 def initialize(custom_colors) @custom_colors = custom_colors end
parameters()
click to toggle source
# File lib/squib/args/paint.rb, line 18 def self.parameters { alpha: 1.0, blend: :none, mask: nil, } end
params_with_units()
click to toggle source
# File lib/squib/args/paint.rb, line 29 def self.params_with_units [] end
Public Instance Methods
validate_alpha(arg, _i)
click to toggle source
# File lib/squib/args/paint.rb, line 33 def validate_alpha(arg, _i) raise 'alpha must respond to to_f' unless arg.respond_to? :to_f arg.to_f end
validate_mask(arg, _i)
click to toggle source
# File lib/squib/args/paint.rb, line 38 def validate_mask(arg, _i) colorify(arg, @custom_colors) end