Sha256: 8c08931c66d5958c1cd9fb97a1edd9781445b04c9d5f32aab6d843cdf6a12ebd

Contents?: true

Size: 269 Bytes

Versions: 4

Compression:

Stored size: 269 Bytes

Contents

module Neows
  module Utils
    # Modifies given list creating an instance of klass for each item
    #
    # @param list [Array]
    # @param klass [Class]
    # @return [list]
    def classify_list!(list, klass)
      list.map! { |h| klass.new(h) }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
neows-1.1.0 lib/neows/utils.rb
neows-1.0.0 lib/neows/utils.rb
neows-0.0.2 lib/neows/utils.rb
neows-0.0.1 lib/neows/utils.rb