class YARD::StubProxy
Stubs marshal dumps and acts a delegate class for an object by path
@private
Constants
- FILELEN
Public Class Methods
_load(str)
click to toggle source
# File lib/yard/serializers/yardoc_serializer.rb, line 10 def self._load(str) new(str) end
new(path, transient = false)
click to toggle source
# File lib/yard/serializers/yardoc_serializer.rb, line 13 def initialize(path, transient = false) @path = path @transient = transient end
Public Instance Methods
_dump(_depth)
click to toggle source
# File lib/yard/serializers/yardoc_serializer.rb, line 9 def _dump(_depth) @path end
hash()
click to toggle source
# File lib/yard/serializers/yardoc_serializer.rb, line 11 def hash; @path.hash end
method_missing(meth, *args, &block)
click to toggle source
# File lib/yard/serializers/yardoc_serializer.rb, line 18 def method_missing(meth, *args, &block) return true if meth == :respond_to? && args.first == :_dump @object = nil if @transient @object ||= Registry.at(@path) @object.send(meth, *args, &block) rescue NoMethodError => e e.backtrace.delete_if {|l| l[0, FILELEN] == __FILE__ } raise end