Class: ConvenientService::Common::Plugins::CanHaveCallbacks::Entities::Type Private

Inherits:
Object
  • Object
show all
Includes:
Concern, Support::Castable, Support::Delegate
Defined in:
lib/convenient_service/common/plugins/can_have_callbacks/entities/type.rb,
lib/convenient_service/common/plugins/can_have_callbacks/entities/type/concern.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Defined Under Namespace

Modules: Concern

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concern

after, around, before, callback, callbacks

Methods included from Support::Concern

included

Methods included from Support::Delegate::ClassMethodsForForwardable

#delegate

Methods included from Support::Castable

cast!

Methods included from Support::AbstractMethod

abstract_method

Constructor Details

#initialize(value:) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • value (Symbol)

Since:

  • 1.0.0



31
32
33
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type.rb', line 31

def initialize(value:)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



25
26
27
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type.rb', line 25

def value
  @value
end

Instance Method Details

#==(other) ⇒ Boolean?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • other (Object)

    Can be any type.

Returns:

  • (Boolean, nil)

Since:

  • 1.0.0



39
40
41
42
43
44
45
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type.rb', line 39

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

  return false if value != other.value

  true
end

#eql?(other) ⇒ Boolean?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • other (Object)

    Can be any type.

Returns:

  • (Boolean, nil)

Since:

  • 1.0.0



64
65
66
67
68
69
70
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type.rb', line 64

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

  return false if value != other.value

  true
end

#hashInteger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Integer)

Since:

  • 1.0.0



79
80
81
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type.rb', line 79

def hash
  [self.class, value].hash
end