Sha256: da6e0ba4c70e153ce8692091c37f0818a31519df918491c4a7c29bad37da6a70
Contents?: true
Size: 409 Bytes
Versions: 43
Compression:
Stored size: 409 Bytes
Contents
# frozen_string_literal: true require "active_support/core_ext/enumerable" require "active_support/core_ext/hash/indifferent_access" module ActiveModel module Access # :nodoc: def slice(*methods) methods.flatten.index_with { |method| public_send(method) }.with_indifferent_access end def values_at(*methods) methods.flatten.map! { |method| public_send(method) } end end end
Version data entries
43 entries across 43 versions & 6 rubygems