Class: HashOut::CallRegistry
- Inherits:
-
Object
- Object
- HashOut::CallRegistry
- Defined in:
- lib/hash_out/call_registry.rb
Instance Attribute Summary collapse
-
#hash_out_caller ⇒ Object
readonly
Returns the value of attribute hash_out_caller.
Instance Method Summary collapse
- #delete_caller_from(hash) ⇒ Object
-
#initialize(hash_out_caller) ⇒ CallRegistry
constructor
A new instance of CallRegistry.
- #register_call ⇒ Object
Constructor Details
#initialize(hash_out_caller) ⇒ CallRegistry
Returns a new instance of CallRegistry.
5 6 7 8 |
# File 'lib/hash_out/call_registry.rb', line 5 def initialize hash_out_caller @times_called = 0 @hash_out_caller = hash_out_caller end |
Instance Attribute Details
#hash_out_caller ⇒ Object (readonly)
Returns the value of attribute hash_out_caller.
3 4 5 |
# File 'lib/hash_out/call_registry.rb', line 3 def hash_out_caller @hash_out_caller end |
Instance Method Details
#delete_caller_from(hash) ⇒ Object
14 15 16 |
# File 'lib/hash_out/call_registry.rb', line 14 def delete_caller_from hash hash.delete hash_out_caller if internal_call? end |
#register_call ⇒ Object
10 11 12 |
# File 'lib/hash_out/call_registry.rb', line 10 def register_call @times_called += 1 end |