Class: CassandraObject::Types::JsonType::DirtyHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/cassandra_object/types/json_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record, name, hash, options) ⇒ DirtyHash

Returns a new instance of DirtyHash.



6
7
8
9
10
11
12
13
14
# File 'lib/cassandra_object/types/json_type.rb', line 6

def initialize(record, name, hash, options)
  @record   = record
  @name     = name.to_s
  @options  = options

  self.merge!(hash)
  @init_hash = self.hash
  @init_value = hash
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/cassandra_object/types/json_type.rb', line 5

def name
  @name
end

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/cassandra_object/types/json_type.rb', line 5

def options
  @options
end

#recordObject

Returns the value of attribute record.



5
6
7
# File 'lib/cassandra_object/types/json_type.rb', line 5

def record
  @record
end

Instance Method Details

#[]=(obj, val) ⇒ Object



16
17
18
# File 'lib/cassandra_object/types/json_type.rb', line 16

def []=(obj, val)
  modifying do super end
end

#delete(obj) ⇒ Object



20
21
22
# File 'lib/cassandra_object/types/json_type.rb', line 20

def delete(obj)
  modifying do super end
end