Class: GitLeadTime::Branch
- Inherits:
-
Object
- Object
- GitLeadTime::Branch
- Defined in:
- lib/git_lead_time/branch.rb
Instance Attribute Summary collapse
-
#merge_information ⇒ Object
readonly
Returns the value of attribute merge_information.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
Instance Method Summary collapse
- #each_merge ⇒ Object
-
#initialize(ref) ⇒ Branch
constructor
A new instance of Branch.
Constructor Details
#initialize(ref) ⇒ Branch
Returns a new instance of Branch.
8 9 10 11 |
# File 'lib/git_lead_time/branch.rb', line 8 def initialize(ref) @ref = ref @merge_information = MergeInformation.new(ref) end |
Instance Attribute Details
#merge_information ⇒ Object (readonly)
Returns the value of attribute merge_information.
6 7 8 |
# File 'lib/git_lead_time/branch.rb', line 6 def merge_information @merge_information end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
6 7 8 |
# File 'lib/git_lead_time/branch.rb', line 6 def ref @ref end |
Instance Method Details
#each_merge ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/git_lead_time/branch.rb', line 13 def each_merge return to_enum(__method__) unless block_given? MergeEnumerator.new(ref).each do |merge| yield merge_information.info_for(merge) end end |