Method: YARD::CodeObjects::Proxy#method_missing

Defined in:
lib/yard/code_objects/proxy.rb

#method_missing(meth, *args, &block) ⇒ Object

Dispatches the method to the resolved object.

Raises:

[View source]

178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/yard/code_objects/proxy.rb', line 178

def method_missing(meth, *args, &block)
  if to_obj
    to_obj.__send__(meth, *args, &block)
  else
    log.warn "Load Order / Name Resolution Problem on #{path}:\n" \
             "-\n" \
             "Something is trying to call #{meth} on object #{path} before it has been recognized.\n" \
             "This error usually means that you need to modify the order in which you parse files\n" \
             "so that #{path} is parsed before methods or other objects attempt to access it.\n" \
             "-\n" \
             "YARD will recover from this error and continue to parse but you *may* have problems\n" \
             "with your generated documentation. You should probably fix this.\n" \
             "-\n"
    begin
      super
    rescue NoMethodError
      raise ProxyMethodError, "Proxy cannot call method ##{meth} on object '#{path}'"
    end
  end
end