Class: CodeModels::SourcePoint

Inherits:
Object
  • Object
show all
Defined in:
lib/codemodels/source_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line = nil, column = nil) ⇒ SourcePoint

Returns a new instance of SourcePoint.



60
61
62
63
# File 'lib/codemodels/source_info.rb', line 60

def initialize(line=nil,column=nil)
	@line   = line
	@column = column
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



58
59
60
# File 'lib/codemodels/source_info.rb', line 58

def column
  @column
end

#lineObject

Returns the value of attribute line.



58
59
60
# File 'lib/codemodels/source_info.rb', line 58

def line
  @line
end

Instance Method Details

#==(other) ⇒ Object



69
70
71
# File 'lib/codemodels/source_info.rb', line 69

def ==(other)
	self.eql?(other)
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


65
66
67
# File 'lib/codemodels/source_info.rb', line 65

def eql?(other)
	other.line==line && other.column==column
end