Class: Redmine::Scm::Adapters::Revision

Inherits:
Object
  • Object
show all
Defined in:
lib/redmine/scm/adapters/abstract_adapter.rb

Direct Known Subclasses

GitAdapter::Revision, MercurialAdapter::Revision

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Revision) initialize(attributes = {})



311
312
313
314
315
316
317
318
319
320
321
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 311

def initialize(attributes={})
  self.identifier = attributes[:identifier]
  self.scmid = attributes[:scmid]
  self.name = attributes[:name] || self.identifier
  self.author = attributes[:author]
  self.time = attributes[:time]
  self.message = attributes[:message] || ""
  self.paths = attributes[:paths]
  self.revision = attributes[:revision]
  self.branch = attributes[:branch]
end

Instance Attribute Details

- (Object) author

Returns the value of attribute author



308
309
310
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 308

def author
  @author
end

- (Object) branch

Returns the value of attribute branch



308
309
310
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 308

def branch
  @branch
end

- (Object) identifier

Returns the identifier of this revision; see also Changeset model



324
325
326
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 324

def identifier
  (@identifier || revision).to_s
end

- (Object) message

Returns the value of attribute message



308
309
310
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 308

def message
  @message
end

- (Object) name

Returns the value of attribute name



308
309
310
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 308

def name
  @name
end

- (Object) paths

Returns the value of attribute paths



308
309
310
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 308

def paths
  @paths
end

- (Object) revision

Returns the value of attribute revision



308
309
310
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 308

def revision
  @revision
end

- (Object) scmid

Returns the value of attribute scmid



308
309
310
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 308

def scmid
  @scmid
end

- (Object) time

Returns the value of attribute time



308
309
310
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 308

def time
  @time
end

Instance Method Details

- (Object) format_identifier

Returns the readable identifier.



329
330
331
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 329

def format_identifier
  identifier
end