americanexpress/xcode-result-bundle-processor

View on GitHub
lib/xcoderesultbundleprocessor/keyword_struct.rb

Summary

Maintainability
A
0 mins
Test Coverage
module XcodeResultBundleProcessor

  class KeywordStruct < Struct
    def initialize(*args, **kwargs)
      super()
      param_hash = kwargs.any? ? kwargs : Hash[members.zip(args)]
      param_hash.each { |k, v| self[k] = v }
    end
  end
end