Class: CalendarAssistant::CLI::LinterEventPresenter
- Inherits:
-
EventPresenter
- Object
- SimpleDelegator
- EventPresenter
- CalendarAssistant::CLI::LinterEventPresenter
show all
- Defined in:
- lib/calendar_assistant/cli/linter_event_presenter.rb
Constant Summary
collapse
- EMOJI_ACCEPTED =
"👍"
- EMOJI_DECLINED =
"👎"
- EMOJI_NEEDS_ACTION =
"🤷"
- SUMMARY_THRESHOLD =
5
EventPresenter::EMOJI_WARN
Instance Method Summary
collapse
#view_summary
Instance Method Details
#attendees ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/calendar_assistant/cli/linter_event_presenter.rb', line 19
def attendees
if required_other_attendees.length > SUMMARY_THRESHOLD
summary_attendee_list
else
detailed_attendee_list
end
end
|
#description ⇒ Object
9
10
11
12
13
14
15
16
17
|
# File 'lib/calendar_assistant/cli/linter_event_presenter.rb', line 9
def description
s = formatted_event_date
date_length = s.length
s += rainbow.wrap(sprintf(" | %s", view_summary)).bold
s += event_attributes unless private?
s = rainbow.wrap(Rainbow.uncolor(s)).faint.strike if declined?
s += "\n #{" " * (date_length + 2)}attendees: #{attendees}"
s
end
|