Class: Redmine::Scm::Adapters::Revision
- Inherits:
-
Object
- Object
- Redmine::Scm::Adapters::Revision
- Defined in:
- lib/redmine/scm/adapters/abstract_adapter.rb
Overview
Direct Known Subclasses
CvsAdapter::Revision, GitAdapter::Revision, MercurialAdapter::Revision
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#branch ⇒ Object
Returns the value of attribute branch.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#message ⇒ Object
Returns the value of attribute message.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parents ⇒ Object
Returns the value of attribute parents.
-
#paths ⇒ Object
Returns the value of attribute paths.
-
#revision ⇒ Object
Returns the value of attribute revision.
-
#scmid ⇒ Object
Returns the value of attribute scmid.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#format_identifier ⇒ Object
Returns the readable identifier.
-
#initialize(attributes = {}) ⇒ Revision
constructor
A new instance of Revision.
Constructor Details
#initialize(attributes = {}) ⇒ Revision
Returns a new instance of Revision
368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 368 def initialize(attributes={}) self.identifier = attributes[:identifier] self.scmid = attributes[:scmid] self.name = attributes[:name] || self.identifier self. = attributes[:author] self.time = attributes[:time] self. = attributes[:message] || "" self.paths = attributes[:paths] self.revision = attributes[:revision] self.branch = attributes[:branch] self.parents = attributes[:parents] end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author
364 365 366 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 364 def @author end |
#branch ⇒ Object
Returns the value of attribute branch
364 365 366 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 364 def branch @branch end |
#identifier ⇒ Object
Returns the value of attribute identifier
364 365 366 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 364 def identifier @identifier end |
#message ⇒ Object
Returns the value of attribute message
364 365 366 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 364 def @message end |
#name ⇒ Object
Returns the value of attribute name
364 365 366 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 364 def name @name end |
#parents ⇒ Object
Returns the value of attribute parents
364 365 366 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 364 def parents @parents end |
#paths ⇒ Object
Returns the value of attribute paths
364 365 366 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 364 def paths @paths end |
#revision ⇒ Object
Returns the value of attribute revision
364 365 366 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 364 def revision @revision end |
#scmid ⇒ Object
Returns the value of attribute scmid
364 365 366 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 364 def scmid @scmid end |
#time ⇒ Object
Returns the value of attribute time
364 365 366 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 364 def time @time end |
Instance Method Details
#==(other) ⇒ Object
386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 386 def ==(other) if other.nil? false elsif scmid.present? scmid == other.scmid elsif identifier.present? identifier == other.identifier elsif revision.present? revision == other.revision end end |
#format_identifier ⇒ Object
Returns the readable identifier.
382 383 384 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 382 def format_identifier self.identifier.to_s end |