Class: Refile::Memory::Backend
- Inherits:
-
Object
- Object
- Refile::Memory::Backend
- Extended by:
- BackendMacros
- Defined in:
- lib/refile/memory.rb
Instance Attribute Summary collapse
-
#directory ⇒ Object
readonly
Returns the value of attribute directory.
-
#max_size ⇒ Object
readonly
Returns the value of attribute max_size.
Instance Method Summary collapse
- #clear!(confirm = nil) ⇒ Object
-
#initialize(max_size: nil, hasher: Refile::RandomHasher.new) ⇒ Backend
constructor
A new instance of Backend.
Constructor Details
Instance Attribute Details
#directory ⇒ Object (readonly)
Returns the value of attribute directory.
8 9 10 |
# File 'lib/refile/memory.rb', line 8 def directory @directory end |
#max_size ⇒ Object (readonly)
Returns the value of attribute max_size.
10 11 12 |
# File 'lib/refile/memory.rb', line 10 def max_size @max_size end |
Instance Method Details
#clear!(confirm = nil) ⇒ Object
50 51 52 53 |
# File 'lib/refile/memory.rb', line 50 def clear!(confirm = nil) raise Refile::Confirm unless confirm == :confirm @store = {} end |