Class: SyncHash

Inherits:
Hash show all
Defined in:
lib/mega/synchash.rb

Defined Under Namespace

Modules: Delegator, Inheritor

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DupReplaceSnapshotMixin

#restore_snapshot, #take_snapshot

Constructor Details

#initialize(delegate = nil) ⇒ SyncHash

Returns a new instance of SyncHash.



59
60
61
62
63
64
65
66
67
# File 'lib/mega/synchash.rb', line 59

def initialize(delegate=nil)
  @delegate = delegate
  @sync = ::Sync.new
  if delegate
    self.extend Delegator
  else
    self.extend Inheritor
  end
end

Instance Attribute Details

#delegateObject (readonly)

Returns the value of attribute delegate.



57
58
59
# File 'lib/mega/synchash.rb', line 57

def delegate
  @delegate
end