Sha256: b9111a58dfaccf77a6d0a25bac417b9bad7aa962809c691975ed4816cc662f59

Contents?: true

Size: 203 Bytes

Versions: 11

Compression:

Stored size: 203 Bytes

Contents

# frozen_string_literal: true

module Realize
  # Mix-in that adds some nice common array helpers.
  module Arrays
    def array(value)
      value.is_a?(Hash) ? [value] : Array(value)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
realize-1.3.0 lib/realize/arrays.rb
realize-1.2.0 lib/realize/arrays.rb
realize-1.2.0.pre.alpha lib/realize/arrays.rb
realize-1.1.1 lib/realize/arrays.rb
realize-1.1.1.pre.alpha lib/realize/arrays.rb
realize-1.1.0 lib/realize/arrays.rb
realize-1.0.0 lib/realize/arrays.rb
realize-1.0.0.pre.alpha.3 lib/realize/arrays.rb
realize-1.0.0.pre.alpha.2 lib/realize/arrays.rb
realize-1.0.0.pre.alpha.1 lib/realize/arrays.rb
realize-1.0.0.pre.alpha lib/realize/arrays.rb