Class: ConvenientService::Common::Plugins::CanHaveCallbacks::Entities::TypeCollection
- Inherits:
-
Object
- Object
- ConvenientService::Common::Plugins::CanHaveCallbacks::Entities::TypeCollection
- Defined in:
- lib/convenient_service/common/plugins/can_have_callbacks/entities/type_collection.rb
Instance Attribute Summary collapse
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Instance Method Summary collapse
- #==(other) ⇒ Boolean?
- #contain_exactly?(other_types) ⇒ Boolean
- #initialize(types:) ⇒ void constructor
Constructor Details
Instance Attribute Details
#types ⇒ Object (readonly)
Returns the value of attribute types.
13 14 15 |
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type_collection.rb', line 13 def types @types end |
Instance Method Details
#==(other) ⇒ Boolean?
37 38 39 40 41 42 43 |
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type_collection.rb', line 37 def ==(other) return unless other.instance_of?(self.class) return false if types != other.types true end |
#contain_exactly?(other_types) ⇒ Boolean
27 28 29 30 31 |
# File 'lib/convenient_service/common/plugins/can_have_callbacks/entities/type_collection.rb', line 27 def contain_exactly?(other_types) other_types = other_types.map(&Entities::Type.method(:cast!)) Utils::Array.contain_exactly?(types, other_types) end |