Class: Vkhal::Presenter

Inherits:
Object
  • Object
show all
Defined in:
lib/vkhal/presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(events:) ⇒ Presenter

Returns a new instance of Presenter.



3
4
5
# File 'lib/vkhal/presenter.rb', line 3

def initialize(events:)
  @events = events
end

Instance Method Details

#displayObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/vkhal/presenter.rb', line 7

def display
  @events.each do |event|
    puts <<~EVTEND
    Summary:          #{event.summary}
    Location:         #{event.location}
    Organizer:        #{event.organizer}
    Description:      #{event.description}
    Start:            #{format_datetime(event.dtstart)}
    End:              #{format_datetime(event.dtend)}

    EVTEND
  end
end