Sha256: 4f35f4c259bec1070f1ae43f41e07deedaf1ff183af4ba5bfa9d25363dc0f381

Contents?: true

Size: 356 Bytes

Versions: 8

Compression:

Stored size: 356 Bytes

Contents

module Montrose
  module Refinements
    module ArrayConcat
      refine Object do
        def array_concat(other)
          Array(self) + other
        end
      end

      refine Hash do
        # array concat for Hash not supported
        # so we just return self
        def array_concat(_other)
          self
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
montrose-0.6.0 lib/montrose/refinements/array_concat.rb
montrose-0.5.0 lib/montrose/refinements/array_concat.rb
montrose-0.4.3 lib/montrose/refinements/array_concat.rb
montrose-0.4.2 lib/montrose/refinements/array_concat.rb
montrose-0.4.1 lib/montrose/refinements/array_concat.rb
montrose-0.4.0 lib/montrose/refinements/array_concat.rb
montrose-0.3.0 lib/montrose/refinements/array_concat.rb
montrose-0.2.2 lib/montrose/refinements/array_concat.rb