Class: PrLog::Formatter
- Inherits:
-
Struct
- Object
- Struct
- PrLog::Formatter
- Defined in:
- lib/pr_log/formatter.rb
Overview
Format new pull requests from github search response
Instance Attribute Summary collapse
-
#entry_template ⇒ Object
Returns the value of attribute entry_template.
-
#label_prefixes ⇒ Object
Returns the value of attribute label_prefixes.
-
#pull_requests ⇒ Object
Returns the value of attribute pull_requests.
Instance Method Summary collapse
Instance Attribute Details
#entry_template ⇒ Object
Returns the value of attribute entry_template
3 4 5 |
# File 'lib/pr_log/formatter.rb', line 3 def entry_template @entry_template end |
#label_prefixes ⇒ Object
Returns the value of attribute label_prefixes
3 4 5 |
# File 'lib/pr_log/formatter.rb', line 3 def label_prefixes @label_prefixes end |
#pull_requests ⇒ Object
Returns the value of attribute pull_requests
3 4 5 |
# File 'lib/pr_log/formatter.rb', line 3 def pull_requests @pull_requests end |
Instance Method Details
#entries ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/pr_log/formatter.rb', line 7 def entries return '' if pull_requests.empty? pull_requests.map do |pull_request| entry_template % entry_template_data(pull_request) end.join.prepend("\n") end |