Class: CodeMiner::Substitution::Value

Inherits:
Struct
  • Object
show all
Defined in:
lib/codeminer/substitution.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#column_adjustmentObject

Returns the value of attribute column_adjustment

Returns:

  • (Object)

    the current value of column_adjustment



5
6
7
# File 'lib/codeminer/substitution.rb', line 5

def column_adjustment
  @column_adjustment
end

#nodeObject

Returns the value of attribute node

Returns:

  • (Object)

    the current value of node



5
6
7
# File 'lib/codeminer/substitution.rb', line 5

def node
  @node
end

#replacementObject

Returns the value of attribute replacement

Returns:

  • (Object)

    the current value of replacement



5
6
7
# File 'lib/codeminer/substitution.rb', line 5

def replacement
  @replacement
end

Instance Method Details

#<=>(other) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/codeminer/substitution.rb', line 7

def <=>(other)
  if node.line == other.node.line
    node.column <=> other.node.column
  else
    node.line <=> other.node.line
  end
end