Class: BuildMaster::Algorithms::EditAction

Inherits:
Object
  • Object
show all
Defined in:
lib/buildmaster/algorithms/opn_compare.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(last, type, x, y) ⇒ EditAction

Returns a new instance of EditAction.



76
77
78
79
80
81
# File 'lib/buildmaster/algorithms/opn_compare.rb', line 76

def initialize(last, type, x, y)
  @last = last
  @type = type
  @x = x
  @y = y
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



75
76
77
# File 'lib/buildmaster/algorithms/opn_compare.rb', line 75

def type
  @type
end

#xObject (readonly)

Returns the value of attribute x.



75
76
77
# File 'lib/buildmaster/algorithms/opn_compare.rb', line 75

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



75
76
77
# File 'lib/buildmaster/algorithms/opn_compare.rb', line 75

def y
  @y
end

Instance Method Details

#inspectObject



83
84
85
86
87
88
89
# File 'lib/buildmaster/algorithms/opn_compare.rb', line 83

def inspect
  if @type
    "#{@type.name}(#@x, #@y) - )-" + @last.inspect
  else
    'nil'
  end
end