Class: ConvenientService::Common::Plugins::CanHaveCallbacks::Entities::TypeCollection Private
- Inherits:
-
Object
- Object
- ConvenientService::Common::Plugins::CanHaveCallbacks::Entities::TypeCollection
- Defined in:
- lib/convenient_service/common/plugins/can_have_callbacks/entities/type_collection.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.
Instance Attribute Summary collapse
- #types ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Boolean? private
- #contain_exactly?(other_types) ⇒ Boolean private
- #initialize(types:) ⇒ void constructor private
Constructor Details
#initialize(types:) ⇒ 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.
24 25 26 |
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type_collection.rb', line 24 def initialize(types:) @types = types.map { |type| Entities::Type.cast!(type) } end |
Instance Attribute Details
#types ⇒ Object (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.
18 19 20 |
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type_collection.rb', line 18 def types @types 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.
42 43 44 45 46 47 48 |
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type_collection.rb', line 42 def ==(other) return unless other.instance_of?(self.class) return false if types != other.types true end |
#contain_exactly?(other_types) ⇒ 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.
32 33 34 35 36 |
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type_collection.rb', line 32 def contain_exactly?(other_types) other_types = other_types.map { |type| Entities::Type.cast!(type) } Utils::Array.contain_exactly?(types, other_types) end |