Class: Cript::EHash
- Inherits:
-
Object
- Object
- Cript::EHash
- Defined in:
- lib/cript/ehash.rb
Overview
A hash backed by a Cript::Store object. All methods sent to an instance of this object are wrapped in a transaction and executed immediately.
Constant Summary collapse
- METHODS =
Hash.new.methods - Object.new.methods
- KEY =
:data
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ EHash
constructor
A new instance of EHash.
- #inspect ⇒ Object
- #method_missing(sym, *args, &block) ⇒ Object
- #respond_to?(sym) ⇒ Boolean
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Method Details
#inspect ⇒ Object
22 23 24 |
# File 'lib/cript/ehash.rb', line 22 def inspect "#<#{self.class.name} path='#{@store.path}'>" end |
#respond_to?(sym) ⇒ Boolean
34 35 36 |
# File 'lib/cript/ehash.rb', line 34 def respond_to?(sym) METHODS.include?(sym) end |