Module: Representable::Debug::Binding

Defined in:
lib/representable/debug.rb

Instance Method Summary collapse

Instance Method Details

#evaluate_option(name, *args, &block) ⇒ Object


34
35
36
37
38
39
40
41
42
43
# File 'lib/representable/debug.rb', line 34

def evaluate_option(name, *args, &block)
  puts "=====#{self[name]}" if name ==:prepare
  puts (evaled = self[name]) ?
    "                #evaluate_option [#{name}]: eval!!!" :
    "                #evaluate_option [#{name}]: skipping"
  value = super
  puts "                #evaluate_option [#{name}]: --> #{value}" if evaled
  puts "                #evaluate_option [#{name}]: -->= #{args.first}" if name == :setter
  value
end

#populatorObject


45
46
47
# File 'lib/representable/debug.rb', line 45

def populator
  super.extend(Populator)
end

#read(doc) ⇒ Object


28
29
30
31
32
# File 'lib/representable/debug.rb', line 28

def read(doc)
  value = super
  puts "                #read --> #{value.inspect}"
  value
end

#serializerObject


49
50
51
# File 'lib/representable/debug.rb', line 49

def serializer
  super.extend(Serializer)
end