Class: Decode::Language::Ruby::Function

Inherits:
Method show all
Defined in:
lib/decode/language/ruby/function.rb

Overview

A Ruby-specific function.

Instance Attribute Summary

Attributes inherited from Method

#receiver

Attributes inherited from Definition

#The comment lines which directly preceeded the definition., #The language the symbol is defined within., #The path to the definition, relative to the parent., #The source file containing this definition., #comments, #language, #parent, #path, #source, #visibility

Instance Method Summary collapse

Methods inherited from Method

#convert, #initialize, #long_form, #qualified_form, #qualified_name, #short_form

Methods inherited from Definition

#:public, :private, :protected=, #The parent definition, defining lexical scope.=, #The symbol name e.g. `:Decode`.=, #container?, #convert, #coverage_relevant?, #documentation, #documented?, #full_path, #initialize, #inspect, #location, #long_form, #multiline?, #name, #nested?, #public?, #qualified_form, #qualified_name, #short_form, #start_with?, #text

Constructor Details

This class inherits a constructor from Decode::Language::Ruby::Method

Instance Method Details

#arguments_nodeObject

The node which contains the function arguments.



19
20
21
22
23
24
25
# File 'lib/decode/language/ruby/function.rb', line 19

def arguments_node
	if node = @node.children[2]
		if node.location.expression
			return node
		end
	end
end

#nested_nameObject

Generate a nested name for the function.



14
15
16
# File 'lib/decode/language/ruby/function.rb', line 14

def nested_name
	".#{@name}"
end