Module: CodeModels::Ruby::Constant::Methods

Included in:
CodeModels::Ruby::Constant
Defined in:
lib/codemodels/ruby/metamodel.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject



239
240
241
# File 'lib/codemodels/ruby/metamodel.rb', line 239

def inspect
	'Constant{'+self.to_s+'}'
end

#to_sObject



234
235
236
237
# File 'lib/codemodels/ruby/metamodel.rb', line 234

def to_s
	return "#{name}" unless container
	"#{container}::#{name}"
end

#top_container_derivedObject



228
229
230
231
232
# File 'lib/codemodels/ruby/metamodel.rb', line 228

def top_container_derived
	return nil unless container
	return container unless (container.respond_to?(:container) and container.container)
	container.top_container
end