Class: BzrWrapper::Info
- Inherits:
-
Object
- Object
- BzrWrapper::Info
- Defined in:
- lib/bzrwrapper.rb
Overview
class representing status-information of given bazaar-branch
Instance Attribute Summary collapse
-
#branch_nick ⇒ Object
readonly
name/nick of the branch.
-
#date ⇒ Object
readonly
date of last commit.
-
#revision_id ⇒ Object
readonly
latest revision-id.
-
#revno ⇒ Object
readonly
latest revision-number.
Instance Method Summary collapse
-
#initialize(date_string, revision, nick, revision_id) ⇒ Info
constructor
A new instance of Info.
- #to_s ⇒ Object
Constructor Details
#initialize(date_string, revision, nick, revision_id) ⇒ Info
Returns a new instance of Info.
188 189 190 |
# File 'lib/bzrwrapper.rb', line 188 def initialize(date_string, revision, nick, revision_id) @date,@revno,@branch_nick, @revision_id = Time.parse(date_string.chomp.strip), revision.chomp, nick.chomp, revision_id.chomp end |
Instance Attribute Details
#branch_nick ⇒ Object (readonly)
name/nick of the branch
184 185 186 |
# File 'lib/bzrwrapper.rb', line 184 def branch_nick @branch_nick end |
#date ⇒ Object (readonly)
date of last commit
180 181 182 |
# File 'lib/bzrwrapper.rb', line 180 def date @date end |
#revision_id ⇒ Object (readonly)
latest revision-id
186 187 188 |
# File 'lib/bzrwrapper.rb', line 186 def revision_id @revision_id end |
#revno ⇒ Object (readonly)
latest revision-number
182 183 184 |
# File 'lib/bzrwrapper.rb', line 182 def revno @revno end |
Instance Method Details
#to_s ⇒ Object
192 193 194 |
# File 'lib/bzrwrapper.rb', line 192 def to_s "revision: #{@revno} | date: #{@date.to_s} | branch-nick: #{@branch_nick} | revision-id: #{@revision_id}" end |