Class: Redmine::Scm::Adapters::Revision
- Inherits:
-
Object
- Object
- Redmine::Scm::Adapters::Revision
- Defined in:
- lib/redmine/scm/adapters/abstract_adapter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#branch ⇒ Object
Returns the value of attribute branch.
-
#identifier ⇒ Object
Returns the identifier of this revision; see also Changeset model.
-
#message ⇒ Object
Returns the value of attribute message.
-
#name ⇒ Object
Returns the value of attribute name.
-
#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
-
#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.
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. = attributes[:author] self.time = attributes[:time] self. = attributes[:message] || "" self.paths = attributes[:paths] self.revision = attributes[:revision] self.branch = attributes[:branch] end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
303 304 305 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303 def @author end |
#branch ⇒ Object
Returns the value of attribute branch.
303 304 305 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303 def branch @branch end |
#identifier ⇒ Object
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 |
#message ⇒ Object
Returns the value of attribute message.
303 304 305 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303 def @message end |
#name ⇒ Object
Returns the value of attribute name.
303 304 305 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303 def name @name end |
#paths ⇒ Object
Returns the value of attribute paths.
303 304 305 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303 def paths @paths end |
#revision ⇒ Object
Returns the value of attribute revision.
303 304 305 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303 def revision @revision end |
#scmid ⇒ Object
Returns the value of attribute scmid.
303 304 305 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 303 def scmid @scmid end |
#time ⇒ Object
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_identifier ⇒ Object
Returns the readable identifier.
324 325 326 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 324 def format_identifier identifier end |