Class: Olelo::Version
Overview
Version object
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#parents ⇒ Object
readonly
Returns the value of attribute parents.
Class Method Summary collapse
-
.short(id) ⇒ String
Shortens given version id.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Check equality of versions.
-
#initialize(id, author, date, comment, parents, head) ⇒ Version
constructor
A new instance of Version.
-
#short ⇒ String
Returns shortened unique version id.
-
#to_s ⇒ String
Return version id.
Constructor Details
#initialize(id, author, date, comment, parents, head) ⇒ Version
Returns a new instance of Version.
7 8 9 |
# File 'lib/olelo/repository.rb', line 7 def initialize(id, , date, comment, parents, head) @id, @author, @date, @comment, @parents, @head = id, , date, comment, parents, head end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
4 5 6 |
# File 'lib/olelo/repository.rb', line 4 def @author end |
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
4 5 6 |
# File 'lib/olelo/repository.rb', line 4 def comment @comment end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
4 5 6 |
# File 'lib/olelo/repository.rb', line 4 def date @date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/olelo/repository.rb', line 4 def id @id end |
#parents ⇒ Object (readonly)
Returns the value of attribute parents.
4 5 6 |
# File 'lib/olelo/repository.rb', line 4 def parents @parents end |
Class Method Details
.short(id) ⇒ String
Shortens given version id
24 25 26 |
# File 'lib/olelo/repository.rb', line 24 def self.short(id) Repository.instance.short_version(id) end |