Sha256: 14b76826239bfa0d6c207d633126719de8b9a44f937bddd8121bc14e5c49241c

Contents?: true

Size: 307 Bytes

Versions: 6

Compression:

Stored size: 307 Bytes

Contents

# frozen_string_literal: true

module Marameters
  # Captures arguments, by category, for message splatting.
  Splat = Struct.new :positionals, :keywords, :block, keyword_init: true do
    def initialize *arguments
      super

      self[:positionals] ||= []
      self[:keywords] ||= {}
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
marameters-1.0.1 lib/marameters/splat.rb
marameters-1.0.0 lib/marameters/splat.rb
marameters-0.10.0 lib/marameters/splat.rb
marameters-0.9.0 lib/marameters/splat.rb
marameters-0.8.0 lib/marameters/splat.rb
marameters-0.7.0 lib/marameters/splat.rb