Sha256: ced8a7891c4073a810844460f207ca8b52376e5313aae228c7df64b735a72cbc

Contents?: true

Size: 771 Bytes

Versions: 4

Compression:

Stored size: 771 Bytes

Contents

# frozen_string_literal: true

##
#
#
module ConvenientService
  module Examples
    module Standard
      module V1
        class RequestParams
          module Utils
            module Object
              ##
              # TODO: Specs.
              #
              class Blank < ConvenientService::Command
                attr_reader :object

                def initialize(object)
                  @object = object
                end

                ##
                # https://api.rubyonrails.org/classes/Object.html#method-i-blank-3F
                #
                def call
                  object.respond_to?(:empty?) ? !!object.empty? : !object
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
convenient_service-0.17.0 lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb
convenient_service-0.16.0 lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb
convenient_service-0.15.0 lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb
convenient_service-0.14.0 lib/convenient_service/examples/standard/v1/request_params/utils/object/blank.rb