Class: Svn::Scm::Adapters::Revision
- Inherits:
-
Object
- Object
- Svn::Scm::Adapters::Revision
- Defined in:
- lib/Svn/scm/adapters/subversion.rb
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
271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 271 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.
268 269 270 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 268 def @author end |
#branch ⇒ Object
Returns the value of attribute branch.
268 269 270 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 268 def branch @branch end |
#identifier ⇒ Object
Returns the value of attribute identifier.
268 269 270 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 268 def identifier @identifier end |
#message ⇒ Object
Returns the value of attribute message.
268 269 270 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 268 def @message end |
#name ⇒ Object
Returns the value of attribute name.
268 269 270 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 268 def name @name end |
#parents ⇒ Object
Returns the value of attribute parents.
268 269 270 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 268 def parents @parents end |
#paths ⇒ Object
Returns the value of attribute paths.
268 269 270 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 268 def paths @paths end |
#revision ⇒ Object
Returns the value of attribute revision.
268 269 270 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 268 def revision @revision end |
#scmid ⇒ Object
Returns the value of attribute scmid.
268 269 270 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 268 def scmid @scmid end |
#time ⇒ Object
Returns the value of attribute time.
268 269 270 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 268 def time @time end |
Instance Method Details
#==(other) ⇒ Object
289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 289 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.
285 286 287 |
# File 'lib/Svn/scm/adapters/subversion.rb', line 285 def format_identifier self.identifier.to_s end |