Class: SyncHash
Defined Under Namespace
Instance Attribute Summary collapse
-
#delegate ⇒ Object
readonly
Returns the value of attribute delegate.
Instance Method Summary collapse
-
#initialize(delegate = nil) ⇒ SyncHash
constructor
A new instance of SyncHash.
Methods inherited from Hash
#&, #*, #+, #-, #<<, #alias!, #argumentize, autonew, #delete_unless, #delete_values, #delete_values_at, #diff, #each_with_key, #except, #except!, #has_keys?, #has_only_keys?, #insert, #inverse, #join, #mash!, #normalize_keys, #normalize_keys!, #pairs_at, #rand_key, #rand_key!, #rand_pair, #rand_pair!, #rand_value, #rand_value!, #rekey, #rekey!, #replace_each, #restore_snapshot, #reverse_merge, #reverse_merge!, #select!, #shuffle, #shuffle!, #slice, #slice!, #stringify_keys, #stringify_keys!, #swap!, #swapkey!, #symbolize_keys, #symbolize_keys!, #take_snapshot, #to_console, #to_h, #to_openobject, #to_ostruct, #to_ostruct_recurse, #to_proc, #to_proc_with_reponse, #to_struct, #traverse, #traverse!, #update_each, #update_keys, #update_values, #variablize_keys, #variablize_keys!, #weave, zipnew, #|
Constructor Details
#initialize(delegate = nil) ⇒ SyncHash
Returns a new instance of SyncHash.
59 60 61 62 63 64 65 66 67 |
# File 'lib/more/facets/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
#delegate ⇒ Object (readonly)
Returns the value of attribute delegate.
57 58 59 |
# File 'lib/more/facets/synchash.rb', line 57 def delegate @delegate end |