Sha256: e98850631237522a076556f1ba4fde040856c06cb31ca96320cd59ab0b9991cf
Contents?: true
Size: 486 Bytes
Versions: 4
Compression:
Stored size: 486 Bytes
Contents
# frozen_string_literal: true module Attend class RegisterAttendances attr_reader :zoho, :dry_run def initialize(zoho:, dry_run: true) @zoho = zoho @dry_run = dry_run end def call(attendances) attendances.each do |attendance| if dry_run puts "DRY RUN: Committing #{attendance}" next end zoho.post_attendance(attendance) puts "Successfully registered #{attendance}" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems