Skip to content

Instantly share code, notes, and snippets.

@arthurschreiber
Created May 14, 2012 21:09
Show Gist options
  • Save arthurschreiber/2697050 to your computer and use it in GitHub Desktop.
Save arthurschreiber/2697050 to your computer and use it in GitHub Desktop.
module YARD
module CodeObjects
module Tcl
class NamespaceObject < CodeObjects::Base
attr_writer :resolution_path
attr_reader :children
def initialize(namespace, name, *args, &block)
@children = CodeObjectList.new(self)
@resolution_path = CodeObjectList.new(self)
super
end
def procs
children.select { |o| o.is_a? ProcObject }
end
end
class ProcObject < CodeObjects::Base
attr_accessor :parameters
def initialize(namespace, name, &block)
self.parameters = []
super
end
def path
@path ||= if !namespace || namespace.path == ""
sep + super
else
super
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment