module ActiveRecord::Chemistry::Extendable::InstanceMethods
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
Calls superclass method
# File lib/activerecord/chemistry/extendable/instance_methods.rb, line 26 def method_missing(method, *args, &block) if !self_respond_to?(method) && extendable.respond_to?(method) extendable.send(method, *args, &block) else super end end
respond_to?(name, include_private = false, as_original_class = false)
click to toggle source
Calls superclass method
# File lib/activerecord/chemistry/extendable/instance_methods.rb, line 14 def respond_to?(name, include_private = false, as_original_class = false) if as_original_class super(name, include_private) else super(name, include_private) || extendable.respond_to?(name) end end
self_respond_to?(name, include_private = false)
click to toggle source
# File lib/activerecord/chemistry/extendable/instance_methods.rb, line 22 def self_respond_to?(name, include_private = false) respond_to? name, include_private, true end
Protected Instance Methods
extendable_must_be_valid()
click to toggle source
# File lib/activerecord/chemistry/extendable/instance_methods.rb, line 5 def extendable_must_be_valid unless extendable.valid? extendable.errors.each do |attribute, message| errors.add(attribute, message) unless errors[attribute].include?(message) end end end