Class: E20::Ops::Revision
- Inherits:
-
Object
- Object
- E20::Ops::Revision
- Defined in:
- lib/e20/ops/revision.rb
Instance Method Summary collapse
-
#initialize(root = Pathname.new(Dir.pwd)) ⇒ Revision
constructor
A new instance of Revision.
- #to_s ⇒ Object
Constructor Details
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/e20/ops/revision.rb', line 11 def to_s @revision ||= begin if revision_file.exist? revision_file.read.strip elsif revision_from_git.present? revision_from_git else "unknown" end end end |