Sha256: 415cf03c8f9b940a08599fe78806b048aa9457bb68d6900130a040c3b3c12ab9
Contents?: true
Size: 717 Bytes
Versions: 6
Compression:
Stored size: 717 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, nil] # @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
6 entries across 6 versions & 1 rubygems