Class: HustleAndFlow::Formatters::IssueDetailFormatter
- Inherits:
-
Object
- Object
- HustleAndFlow::Formatters::IssueDetailFormatter
- Includes:
- Utils::String
- Defined in:
- lib/hustle_and_flow/formatters/issue_detail_formatter.rb
Instance Attribute Summary collapse
-
#issue ⇒ Object
Returns the value of attribute issue.
Instance Method Summary collapse
-
#initialize(issue) ⇒ IssueDetailFormatter
constructor
A new instance of IssueDetailFormatter.
- #to_hash ⇒ Object
Methods included from Utils::String
Constructor Details
#initialize(issue) ⇒ IssueDetailFormatter
Returns a new instance of IssueDetailFormatter.
10 11 12 |
# File 'lib/hustle_and_flow/formatters/issue_detail_formatter.rb', line 10 def initialize(issue) self.issue = issue end |
Instance Attribute Details
#issue ⇒ Object
Returns the value of attribute issue.
8 9 10 |
# File 'lib/hustle_and_flow/formatters/issue_detail_formatter.rb', line 8 def issue @issue end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/hustle_and_flow/formatters/issue_detail_formatter.rb', line 14 def to_hash { header: { format: issue_header_formatting, value: issue_header, }, divider: { format: issue_divider_formatting, value: nil, }, contact: { format: issue_contact_formatting, value: issue_contact, }, body: { format: issue_body_formatting, value: issue.body, }, } end |