lib/origen/controller.rb
# Used to proxy all method and attribute requests not implemented on the controller
# to the model.
#
# On first call of a missing method a method is generated to avoid the missing lookup
# next time, this should be faster for repeated lookups of the same method, e.g. reg
Used to proxy all method and attribute requests not implemented on the controller
to the model.

On first call of a missing method a method is generated to avoid the missing lookup
next time, this should be faster for repeated lookups of the same method, e.g. reg
Used to proxy all method and attribute requests not implemented on the controller to the model . On first call of a missing method a method is generated to avoid the missing lookup next time this should be faster for repeated lookups of the same method e . g . reg
def method_missing(method, *args, &block)
      if model.respond_to?(method)
        if method.to_sym == :base_address
          define_singleton_method(method) do
            model.send(method)
          end
          base_address
        else
          define_singleton_method(method) do |*args, &block|
            model.send(method, *args, &block)
          end
          send(method, *args, &block)
        end
      else
        super
      end
    end
def method_missing ( method , * args , & block ) if model . respond_to? ( method ) if method . to_sym == :base_address define_singleton_method ( method ) do model . send ( method ) end base_address else define_singleton_method ( method ) do | * args , & block | model . send ( method , * args , & block ) end send ( method , * args , & block ) end else super end end
Used to proxy all method and attribute requests not implemented on the controller
to the model.
Used to proxy all method and attribute requests not implemented on the controller to the model .
# This method is handled separately since it is important to produce a proxy method # that takes no arguments, otherwise the register address lookup system mistakes it # for a legacy way of calculating the base address whereby the register itself was # given as an argument.
method
<not_specific>
args
<not_specific>
block
<not_specific>