Class: PactBroker::Versions::BranchVersion
- Inherits:
-
Object
- Object
- PactBroker::Versions::BranchVersion
- Defined in:
- lib/pact_broker/versions/branch_version.rb
Instance Method Summary collapse
Instance Method Details
#before_save ⇒ Object
22 23 24 25 26 27 |
# File 'lib/pact_broker/versions/branch_version.rb', line 22 def before_save super self.version_order = version.order self.pacticipant_id = version.pacticipant_id self.branch_name = branch.name end |
#latest? ⇒ Boolean
29 30 31 32 |
# File 'lib/pact_broker/versions/branch_version.rb', line 29 def latest? # Should not be possible, not to have a branch head, but have seen this error in the logs branch_head&.branch_version_id == id end |
#pacticipant ⇒ Object
38 39 40 |
# File 'lib/pact_broker/versions/branch_version.rb', line 38 def pacticipant branch.pacticipant end |
#version_number ⇒ Object
34 35 36 |
# File 'lib/pact_broker/versions/branch_version.rb', line 34 def version_number version.number end |