Class: Blastr::SourceControl::MercurialRevision
- Inherits:
-
Object
- Object
- Blastr::SourceControl::MercurialRevision
- Defined in:
- lib/scm/hg.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #before?(revision) ⇒ Boolean
-
#initialize(name) ⇒ MercurialRevision
constructor
A new instance of MercurialRevision.
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ MercurialRevision
Returns a new instance of MercurialRevision.
10 11 12 |
# File 'lib/scm/hg.rb', line 10 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/scm/hg.rb', line 8 def name @name end |
Instance Method Details
#==(other) ⇒ Object
18 19 20 |
# File 'lib/scm/hg.rb', line 18 def ==(other) @name == other.name end |
#before?(revision) ⇒ Boolean
22 23 24 25 26 |
# File 'lib/scm/hg.rb', line 22 def before?(revision) return false if @name == "tip" return true if revision.name == "tip" @name.to_i < revision.name.to_i end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/scm/hg.rb', line 14 def to_s @name end |