Class: Perforce2Svn::Mapping::Move

Inherits:
Command show all
Defined in:
lib/perforce2svn/mapping/commands.rb

Instance Attribute Summary collapse

Attributes inherited from Operation

#line_number

Instance Method Summary collapse

Constructor Details

#initialize(tok, svn_from, svn_to) ⇒ Move

Returns a new instance of Move.



38
39
40
41
42
# File 'lib/perforce2svn/mapping/commands.rb', line 38

def initialize(tok, svn_from, svn_to)
  super(tok)
  @svn_from = svn_from
  @svn_to = svn_to
end

Instance Attribute Details

#svn_fromObject (readonly)

Returns the value of attribute svn_from.



37
38
39
# File 'lib/perforce2svn/mapping/commands.rb', line 37

def svn_from
  @svn_from
end

#svn_toObject (readonly)

Returns the value of attribute svn_to.



37
38
39
# File 'lib/perforce2svn/mapping/commands.rb', line 37

def svn_to
  @svn_to
end

Instance Method Details

#execute!(svn_txn) ⇒ Object



44
45
46
# File 'lib/perforce2svn/mapping/commands.rb', line 44

def execute!(svn_txn)
  svn_txn.move(@svn_from, @svn_to)
end