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.



306
307
308
309
310
311
312
313
314
315
316
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 306

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.



303
304
305
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303

def author
  @author
end

#branchObject

Returns the value of attribute branch.



303
304
305
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303

def branch
  @branch
end

#identifierObject

Returns the identifier of this revision; see also Changeset model



319
320
321
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 319

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

#messageObject

Returns the value of attribute message.



303
304
305
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303

def message
  @message
end

#nameObject

Returns the value of attribute name.



303
304
305
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303

def name
  @name
end

#pathsObject

Returns the value of attribute paths.



303
304
305
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303

def paths
  @paths
end

#revisionObject

Returns the value of attribute revision.



303
304
305
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303

def revision
  @revision
end

#scmidObject

Returns the value of attribute scmid.



303
304
305
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303

def scmid
  @scmid
end

#timeObject

Returns the value of attribute time.



303
304
305
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303

def time
  @time
end

Instance Method Details

#format_identifierObject

Returns the readable identifier.



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

def format_identifier
  identifier
end