Module: CodeModels::SourceInfoExtensions

Included in:
CodeModelsAstNode
Defined in:
lib/codemodels/source_info.rb

Overview

This extension give all the information about the source  from which the node was derived

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#languageObject

Returns the value of attribute language.



125
126
127
# File 'lib/codemodels/source_info.rb', line 125

def language
  @language
end

#sourceObject

Returns the value of attribute source.



126
127
128
# File 'lib/codemodels/source_info.rb', line 126

def source
  @source
end

Instance Method Details

#end_point=(data) ⇒ Object

Parameters:

  • data

    is expected to be an hash with :line and :column



135
136
137
138
# File 'lib/codemodels/source_info.rb', line 135

def end_point=(data)
	@source = SourceInfo.new unless @source
	@source.end_point = data
end

#start_point=(data) ⇒ Object

Parameters:

  • data

    is expected to be an hash with :line and :column



129
130
131
132
# File 'lib/codemodels/source_info.rb', line 129

def start_point=(data)
	@source = SourceInfo.new unless @source
	@source.start_point = data
end