Sha256: 8a2ae38dda8d6fb3d3ea91091a2ecc38cf080e227a5cc53334d1c1a338dcd73c

Contents?: true

Size: 160 Bytes

Versions: 38

Compression:

Stored size: 160 Bytes

Contents

module Goodcheck
  module ArrayHelper
    def array(obj)
      case obj
      when Hash
        [obj]
      else
        Array(obj)
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
goodcheck-3.1.0 lib/goodcheck/array_helper.rb
goodcheck-3.0.3 lib/goodcheck/array_helper.rb
goodcheck-3.0.2 lib/goodcheck/array_helper.rb
goodcheck-3.0.1 lib/goodcheck/array_helper.rb
goodcheck-3.0.0 lib/goodcheck/array_helper.rb
goodcheck-2.7.0 lib/goodcheck/array_helper.rb
goodcheck-2.6.1 lib/goodcheck/array_helper.rb
goodcheck-2.6.0 lib/goodcheck/array_helper.rb
goodcheck-2.5.2 lib/goodcheck/array_helper.rb
goodcheck-2.5.1 lib/goodcheck/array_helper.rb
goodcheck-2.5.0 lib/goodcheck/array_helper.rb
goodcheck-2.4.5 lib/goodcheck/array_helper.rb
goodcheck-2.4.4 lib/goodcheck/array_helper.rb
goodcheck-2.4.3 lib/goodcheck/array_helper.rb
goodcheck-2.4.2 lib/goodcheck/array_helper.rb
goodcheck-2.4.1 lib/goodcheck/array_helper.rb
goodcheck-2.4.0 lib/goodcheck/array_helper.rb
goodcheck-2.3.2 lib/goodcheck/array_helper.rb
goodcheck-2.3.1 lib/goodcheck/array_helper.rb
goodcheck-2.3.0 lib/goodcheck/array_helper.rb