Class: Perforce2Svn::Mapping::Copy

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) ⇒ Copy

Returns a new instance of Copy.



13
14
15
16
17
# File 'lib/perforce2svn/mapping/commands.rb', line 13

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.



12
13
14
# File 'lib/perforce2svn/mapping/commands.rb', line 12

def svn_from
  @svn_from
end

#svn_toObject (readonly)

Returns the value of attribute svn_to.



12
13
14
# File 'lib/perforce2svn/mapping/commands.rb', line 12

def svn_to
  @svn_to
end

Instance Method Details

#execute!(svn_txn) ⇒ Object



19
20
21
# File 'lib/perforce2svn/mapping/commands.rb', line 19

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