lib/blobject.rb in blobject-0.2.1 vs lib/blobject.rb in blobject-0.2.2
- old
+ new
@@ -41,10 +41,15 @@
if @modifying
case params.length
when 0 # get
- return @hash[sym] if @hash.has_key? sym
+ value = @hash[sym]
+
+ if value
+ value.modify(&block) if block_given? and value.instance_of?(Blobject)
+ return value
+ end
child = Blobject.new
parent = self
child.__r_modify_set__ true
\ No newline at end of file