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-2.2.0 lib/goodcheck/array_helper.rb
goodcheck-2.1.2 lib/goodcheck/array_helper.rb
goodcheck-2.1.1 lib/goodcheck/array_helper.rb
goodcheck-2.1.0 lib/goodcheck/array_helper.rb
goodcheck-1.7.1 lib/goodcheck/array_helper.rb
goodcheck-1.7.0 lib/goodcheck/array_helper.rb
goodcheck-1.6.0 lib/goodcheck/array_helper.rb
goodcheck-1.5.1 lib/goodcheck/array_helper.rb
goodcheck-1.5.0 lib/goodcheck/array_helper.rb
goodcheck-1.4.1 lib/goodcheck/array_helper.rb
goodcheck-1.4.0 lib/goodcheck/array_helper.rb
goodcheck-1.3.1 lib/goodcheck/array_helper.rb
goodcheck-1.2.0 lib/goodcheck/array_helper.rb
goodcheck-1.1.0 lib/goodcheck/array_helper.rb
goodcheck-1.0.0 lib/goodcheck/array_helper.rb
goodcheck-0.3.0 lib/goodcheck/array_helper.rb
goodcheck-0.2.0 lib/goodcheck/array_helper.rb
goodcheck-0.1.0 lib/goodcheck/array_helper.rb