Sha256: 48424c2f594d56b5191600d51b466fbb53cdee50252d7e7233a46d0a49ab7ea9
Contents?: true
Size: 522 Bytes
Versions: 9
Compression:
Stored size: 522 Bytes
Contents
# frozen_string_literal: true module RakeFactory module Arguments def initialize(*args, &configuration_block) arity = method(:initialize).super_method.arity super(*args.slice(0, arity), &configuration_block) process_arguments(args) end def process_arguments(args) opts = args.first || {} opts.each { |key, value| set_if_parameter(key, value) } end private def set_if_parameter(key, value) send("#{key}=", value) if respond_to?("#{key}=") end end end
Version data entries
9 entries across 9 versions & 1 rubygems