Class: Dependabot::PullRequestCreator::MessageBuilder::MetadataPresenter
- Inherits:
-
Object
- Object
- Dependabot::PullRequestCreator::MessageBuilder::MetadataPresenter
- Extended by:
- Forwardable, T::Sig
- Defined in:
- lib/dependabot/pull_request_creator/message_builder/metadata_presenter.rb
Instance Attribute Summary collapse
-
#dependency ⇒ Object
readonly
Returns the value of attribute dependency.
-
#github_redirection_service ⇒ Object
readonly
Returns the value of attribute github_redirection_service.
-
#metadata_finder ⇒ Object
readonly
Returns the value of attribute metadata_finder.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#vulnerabilities_fixed ⇒ Object
readonly
Returns the value of attribute vulnerabilities_fixed.
Instance Method Summary collapse
-
#initialize(dependency:, source:, metadata_finder:, vulnerabilities_fixed:, github_redirection_service:) ⇒ MetadataPresenter
constructor
A new instance of MetadataPresenter.
- #to_s ⇒ Object
Constructor Details
#initialize(dependency:, source:, metadata_finder:, vulnerabilities_fixed:, github_redirection_service:) ⇒ MetadataPresenter
Returns a new instance of MetadataPresenter.
51 52 53 54 55 56 57 58 |
# File 'lib/dependabot/pull_request_creator/message_builder/metadata_presenter.rb', line 51 def initialize(dependency:, source:, metadata_finder:, vulnerabilities_fixed:, github_redirection_service:) @dependency = dependency @source = source @metadata_finder = @vulnerabilities_fixed = vulnerabilities_fixed @github_redirection_service = github_redirection_service end |
Instance Attribute Details
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency.
15 16 17 |
# File 'lib/dependabot/pull_request_creator/message_builder/metadata_presenter.rb', line 15 def dependency @dependency end |
#github_redirection_service ⇒ Object (readonly)
Returns the value of attribute github_redirection_service.
27 28 29 |
# File 'lib/dependabot/pull_request_creator/message_builder/metadata_presenter.rb', line 27 def github_redirection_service @github_redirection_service end |
#metadata_finder ⇒ Object (readonly)
Returns the value of attribute metadata_finder.
21 22 23 |
# File 'lib/dependabot/pull_request_creator/message_builder/metadata_presenter.rb', line 21 def @metadata_finder end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
18 19 20 |
# File 'lib/dependabot/pull_request_creator/message_builder/metadata_presenter.rb', line 18 def source @source end |
#vulnerabilities_fixed ⇒ Object (readonly)
Returns the value of attribute vulnerabilities_fixed.
24 25 26 |
# File 'lib/dependabot/pull_request_creator/message_builder/metadata_presenter.rb', line 24 def vulnerabilities_fixed @vulnerabilities_fixed end |
Instance Method Details
#to_s ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/dependabot/pull_request_creator/message_builder/metadata_presenter.rb', line 61 def to_s msg = "" msg += vulnerabilities_cascade msg += release_cascade msg += changelog_cascade msg += upgrade_guide_cascade msg += commits_cascade msg += maintainer_changes_cascade msg += break_tag unless msg == "" "\n" + sanitize_links_and_mentions(msg, unsafe: true) end |