Sha256: b231463e8710952ef17afc4d7de4aa17abbfe02ed785c64278048df23c86d086
Contents?: true
Size: 712 Bytes
Versions: 14
Compression:
Stored size: 712 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Utils module Array class FindLast < Support::Command ## # @!attribute [r] array # @return [Array] # attr_reader :array ## # @!attribute [r] block # @return [Proc] # attr_reader :block ## # @param array [Array] # @param block [Proc] # @return [void] # def initialize(array, &block) @array = array @block = block end ## # @return [Object] Can be any type. # def call array.reverse.find(&block) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems