Sha256: 513e0f20b580165cffcd939baa79af359d0ed7248dfae134f76993d3dbff979d

Contents?: true

Size: 837 Bytes

Versions: 15

Compression:

Stored size: 837 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Common
    module Plugins
      module CachesConstructorParams
        module Entities
          class ConstructorParams
            attr_reader :args, :kwargs, :block

            ##
            # TODO: Specs for default values.
            #
            def initialize(args: [], kwargs: {}, block: nil)
              @args = args
              @kwargs = kwargs
              @block = block
            end

            def ==(other)
              return unless other.instance_of?(self.class)

              return false if args != other.args
              return false if kwargs != other.kwargs
              return false if block&.source_location != other.block&.source_location

              true
            end
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
convenient_service-0.12.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.11.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.10.1 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.10.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.9.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.8.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.7.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.6.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.5.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.4.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.3.1 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.3.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.2.1 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.2.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb
convenient_service-0.1.0 lib/convenient_service/common/plugins/caches_constructor_params/entities/constructor_params.rb