Class: Dao::Data

Inherits:
Map
  • Object
show all
Defined in:
lib/dao/data.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject

look good for inspect



5
6
7
# File 'lib/dao/data.rb', line 5

def inspect
  ::JSON.pretty_generate(self, :max_nesting => 0)
end

#update(*args, &block) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/dao/data.rb', line 14

def update(*args, &block)
  if args.size==1 and args.first.respond_to?(:to_dao)
    to_dao = args.first.to_dao
    return super(to_dao)
  end
  super
end