Class: Gitlab::BranchPushMergeCommitAnalyzer::CommitDecorator
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Gitlab::BranchPushMergeCommitAnalyzer::CommitDecorator
- Defined in:
- lib/gitlab/branch_push_merge_commit_analyzer.rb
Instance Attribute Summary collapse
-
#direct_ancestor ⇒ Object
writeonly
boolean.
-
#merge_commit ⇒ Object
Returns the value of attribute merge_commit.
Instance Method Summary collapse
Instance Attribute Details
#direct_ancestor=(value) ⇒ Object (writeonly)
boolean
54 55 56 |
# File 'lib/gitlab/branch_push_merge_commit_analyzer.rb', line 54 def direct_ancestor=(value) @direct_ancestor = value end |
#merge_commit ⇒ Object
Returns the value of attribute merge_commit.
53 54 55 |
# File 'lib/gitlab/branch_push_merge_commit_analyzer.rb', line 53 def merge_commit @merge_commit end |
Instance Method Details
#direct_ancestor? ⇒ Boolean
56 57 58 |
# File 'lib/gitlab/branch_push_merge_commit_analyzer.rb', line 56 def direct_ancestor? @direct_ancestor end |
#set_merge_commit(child_commit:) ⇒ Object
62 63 64 |
# File 'lib/gitlab/branch_push_merge_commit_analyzer.rb', line 62 def set_merge_commit(child_commit:) @merge_commit ||= direct_ancestor? ? self : child_commit.merge_commit end |