Class: PrivatePlease::Storage::CalledMethodsMemoryStore
- Inherits:
-
Object
- Object
- PrivatePlease::Storage::CalledMethodsMemoryStore
- Defined in:
- lib/private_please/storage/called_methods_memory_store.rb
Instance Attribute Summary collapse
-
#private_calls ⇒ Object
readonly
Returns the value of attribute private_calls.
-
#public_calls ⇒ Object
readonly
Returns the value of attribute public_calls.
Instance Method Summary collapse
- #add_private_call(value) ⇒ Object
- #add_public_call(value) ⇒ Object
-
#initialize ⇒ CalledMethodsMemoryStore
constructor
A new instance of CalledMethodsMemoryStore.
Constructor Details
#initialize ⇒ CalledMethodsMemoryStore
Returns a new instance of CalledMethodsMemoryStore.
6 7 8 9 |
# File 'lib/private_please/storage/called_methods_memory_store.rb', line 6 def initialize @public_calls = Set.new @private_calls = Set.new end |
Instance Attribute Details
#private_calls ⇒ Object (readonly)
Returns the value of attribute private_calls.
4 5 6 |
# File 'lib/private_please/storage/called_methods_memory_store.rb', line 4 def private_calls @private_calls end |
#public_calls ⇒ Object (readonly)
Returns the value of attribute public_calls.
4 5 6 |
# File 'lib/private_please/storage/called_methods_memory_store.rb', line 4 def public_calls @public_calls end |
Instance Method Details
#add_private_call(value) ⇒ Object
15 16 17 |
# File 'lib/private_please/storage/called_methods_memory_store.rb', line 15 def add_private_call(value) @private_calls.add value end |
#add_public_call(value) ⇒ Object
11 12 13 |
# File 'lib/private_please/storage/called_methods_memory_store.rb', line 11 def add_public_call(value) @public_calls .add value end |