Class: Perforce2Svn::Mapping::Update
- Defined in:
- lib/perforce2svn/mapping/commands.rb
Instance Attribute Summary collapse
-
#live_path ⇒ Object
readonly
Returns the value of attribute live_path.
-
#svn_path ⇒ Object
readonly
Returns the value of attribute svn_path.
Attributes inherited from Operation
Instance Method Summary collapse
- #execute!(svn_txn) ⇒ Object
-
#initialize(tok, svn_path, live_path) ⇒ Update
constructor
A new instance of Update.
Constructor Details
#initialize(tok, svn_path, live_path) ⇒ Update
Returns a new instance of Update.
51 52 53 54 55 |
# File 'lib/perforce2svn/mapping/commands.rb', line 51 def initialize(tok, svn_path, live_path) super(tok) @svn_path = svn_path @live_path = live_path end |
Instance Attribute Details
#live_path ⇒ Object (readonly)
Returns the value of attribute live_path.
50 51 52 |
# File 'lib/perforce2svn/mapping/commands.rb', line 50 def live_path @live_path end |
#svn_path ⇒ Object (readonly)
Returns the value of attribute svn_path.
50 51 52 |
# File 'lib/perforce2svn/mapping/commands.rb', line 50 def svn_path @svn_path end |
Instance Method Details
#execute!(svn_txn) ⇒ Object
57 58 59 60 61 |
# File 'lib/perforce2svn/mapping/commands.rb', line 57 def execute!(svn_txn) File.open(@live_path, 'r') do |fstream| svn_txn.update(@svn_path, fstream) end end |