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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Revision

Returns a new instance of Revision



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

#authorObject

Returns the value of attribute author



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

def author
  @author
end

#branchObject

Returns the value of attribute branch



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

def branch
  @branch
end

#identifierObject

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

#messageObject

Returns the value of attribute message



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

def message
  @message
end

#nameObject

Returns the value of attribute name



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

def name
  @name
end

#pathsObject

Returns the value of attribute paths



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

def paths
  @paths
end

#revisionObject

Returns the value of attribute revision



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

def revision
  @revision
end

#scmidObject

Returns the value of attribute scmid



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

def scmid
  @scmid
end

#timeObject

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

#format_identifierObject

Returns the readable identifier.



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

def format_identifier
  identifier
end