Sha256: 7f390fd11a82b109f48a49e5d71a42504854cfd2a7cf9d69d3146fe7cb5ceef1
Contents?: true
Size: 1.13 KB
Versions: 4
Compression:
Stored size: 1.13 KB
Contents
module Inch module CodeObject # CodeObject::Proxy object represent code objects in the analaysed # codebase. # module Proxy class << self # Returns a Proxy object for the given +code_object+ # # @param code_object [YARD::Object::Base] # @return [CodeObject::Proxy::Base] def for(code_object) attributes = Converter.to_hash(code_object) proxy_object = class_for(code_object).new(attributes) end private # Returns a Proxy class for the given +code_object+ # # @param code_object [YARD::CodeObject] # @return [Class] def class_for(code_object) class_name = code_object.class.to_s.split('::').last const_get(class_name) end end end end end require 'inch/code_object/proxy/base' require 'inch/code_object/proxy/namespace_object' require 'inch/code_object/proxy/class_object' require 'inch/code_object/proxy/constant_object' require 'inch/code_object/proxy/method_object' require 'inch/code_object/proxy/method_parameter_object' require 'inch/code_object/proxy/module_object'
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
inch-0.5.0.rc2 | lib/inch/code_object/proxy.rb |
inch-0.5.0.rc1 | lib/inch/code_object/proxy.rb |
inch-0.4.6 | lib/inch/code_object/proxy.rb |
inch-0.4.5 | lib/inch/code_object/proxy.rb |