Class: Nylas::FreeBusyCollection

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/nylas/free_busy_collection.rb

Overview

Helper to get and build ‘FreeBusy` objects

Instance Method Summary collapse

Constructor Details

#initialize(emails:, start_time:, end_time:, api:) ⇒ FreeBusyCollection

Returns a new instance of FreeBusyCollection.



10
11
12
13
14
15
# File 'lib/nylas/free_busy_collection.rb', line 10

def initialize(emails:, start_time:, end_time:, api:)
  @api = api
  @emails = emails
  @start_time = start_time
  @end_time = end_time
end

Instance Method Details

#eachObject



17
18
19
20
21
22
23
# File 'lib/nylas/free_busy_collection.rb', line 17

def each
  return enum_for(:each) unless block_given?

  execute.each do |result|
    yield(FreeBusy.new(**result))
  end
end