Class: Hold::IdentitySetRepository::IdCell
- Inherits:
-
Object
- Object
- Hold::IdentitySetRepository::IdCell
show all
- Includes:
- ObjectCell
- Defined in:
- lib/hold/interfaces/identity_set_repository.rb
Instance Method Summary
collapse
Methods included from ObjectCell
#clear_property, #get_properties, #get_property, #has_property?, #property_cell, #set_property
Methods included from Cell
#can_get_class?, #can_set_class?, #get_unless_empty, #set_if_empty, #set_unless_empty, #value, #value=
Constructor Details
#initialize(id_set_repo, id) ⇒ IdCell
Returns a new instance of IdCell.
96
97
98
99
|
# File 'lib/hold/interfaces/identity_set_repository.rb', line 96
def initialize(id_set_repo, id)
@id_set_repo = id_set_repo
@id = id
end
|
Instance Method Details
#clear ⇒ Object
113
114
115
|
# File 'lib/hold/interfaces/identity_set_repository.rb', line 113
def clear
@id_set_repo.delete_id(@id)
end
|
#empty? ⇒ Boolean
109
110
111
|
# File 'lib/hold/interfaces/identity_set_repository.rb', line 109
def empty?
!@id_set_repo.contains?(@id)
end
|
#get ⇒ Object
101
102
103
|
# File 'lib/hold/interfaces/identity_set_repository.rb', line 101
def get
@id_set_repo.get_by_id(@id)
end
|
#set(value) ⇒ Object
105
106
107
|
# File 'lib/hold/interfaces/identity_set_repository.rb', line 105
def set(value)
@id_set_repo.update_by_id(@id, value)
end
|