Class: Hold::InMemory::SetRepository
- Inherits:
-
Object
- Object
- Hold::InMemory::SetRepository
show all
- Includes:
- SetRepository
- Defined in:
- lib/hold/in_memory/set_repository.rb
Instance Method Summary
collapse
#can_get_class?, #can_set_class?, #store_new
Constructor Details
Returns a new instance of SetRepository.
7
8
9
|
# File 'lib/hold/in_memory/set_repository.rb', line 7
def initialize
@set = Set.new
end
|
Instance Method Details
#contains?(value) ⇒ Boolean
19
20
21
|
# File 'lib/hold/in_memory/set_repository.rb', line 19
def contains?(value)
@set.include?(value)
end
|
#delete(value) ⇒ Object
15
16
17
|
# File 'lib/hold/in_memory/set_repository.rb', line 15
def delete(value)
@set.delete(value)
end
|
#get_all ⇒ Object
23
24
25
|
# File 'lib/hold/in_memory/set_repository.rb', line 23
def get_all
@set.to_a
end
|
#store(value) ⇒ Object
11
12
13
|
# File 'lib/hold/in_memory/set_repository.rb', line 11
def store(value)
@set << value
end
|