Sha256: 52f195957ad3a43161119dfc493c4e4e3223d00657eb1fc56d5593c3b7a80cd6

Contents?: true

Size: 237 Bytes

Versions: 7

Compression:

Stored size: 237 Bytes

Contents

# frozen_string_literal: true

module Nocode
  module Util
    # Hand
    module Arrayable
      def array(value)
        if value.is_a?(Hash)
          [value]
        else
          Array(value)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nocode-0.0.10 lib/nocode/util/arrayable.rb
nocode-0.0.9 lib/nocode/util/arrayable.rb
nocode-0.0.8 lib/nocode/util/arrayable.rb
nocode-0.0.7 lib/nocode/util/arrayable.rb
nocode-0.0.6 lib/nocode/util/arrayable.rb
nocode-0.0.5 lib/nocode/util/arrayable.rb
nocode-0.0.4 lib/nocode/util/arrayable.rb