Class: P4::DepotFile

Inherits:
Object
  • Object
show all
Defined in:
lib/P4.rb

Overview

***************************************************************************** P4::DepotFile class. Each DepotFile entry contains details about one depot file. *****************************************************************************

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ DepotFile

Returns a new instance of DepotFile.



517
518
519
520
521
# File 'lib/P4.rb', line 517

def initialize( name )
  @depot_file = name
  @revisions = Array.new
  @headAction = @head_type = @head_time = @head_rev = @head_change = nil
end

Instance Attribute Details

#depot_fileObject (readonly)

Returns the value of attribute depot_file.



523
524
525
# File 'lib/P4.rb', line 523

def depot_file
  @depot_file
end

#head_actionObject

Returns the value of attribute head_action.



524
525
526
# File 'lib/P4.rb', line 524

def head_action
  @head_action
end

#head_changeObject

Returns the value of attribute head_change.



524
525
526
# File 'lib/P4.rb', line 524

def head_change
  @head_change
end

#head_revObject

Returns the value of attribute head_rev.



524
525
526
# File 'lib/P4.rb', line 524

def head_rev
  @head_rev
end

#head_timeObject

Returns the value of attribute head_time.



524
525
526
# File 'lib/P4.rb', line 524

def head_time
  @head_time
end

#head_typeObject

Returns the value of attribute head_type.



524
525
526
# File 'lib/P4.rb', line 524

def head_type
  @head_type
end

#revisionsObject (readonly)

Returns the value of attribute revisions.



523
524
525
# File 'lib/P4.rb', line 523

def revisions
  @revisions
end

Instance Method Details

#each_revisionObject



532
533
534
# File 'lib/P4.rb', line 532

def each_revision
  @revisions.each { |r| yield( r ) }
end

#new_revisionObject



526
527
528
529
530
# File 'lib/P4.rb', line 526

def new_revision
  r = P4::Revision.new( @depot_file )
  @revisions.push( r )
  return r
end