Sha256: b9fcd1c57069c22c00d4c58b591e7381d2127ad8e0ba20e7b534df191a08cf1b
Contents?: true
Size: 873 Bytes
Versions: 80
Compression:
Stored size: 873 Bytes
Contents
module Eco class CLI class Config class Filters class PeopleFilters < Eco::CLI::Config::Filters def help(refine: nil) refinement = refine.is_a?(String)? " (containing: '#{refine}')" : "" super("The following are the available filters on people#{refinement}:", refine: refine) end def process(io:) unless io && io.is_a?(Eco::API::UseCases::BaseIO) raise "You need to provide Eco::API::UseCases::BaseIO object. Given: #{io.class}" end io = io.new(type: :transform) @filters.each do |arg, callback| if SCR.get_arg(arg) io = io.new(people: callback.call(*io.params)) end end io.people end end end end end end
Version data entries
80 entries across 80 versions & 1 rubygems