Sha256: de22ab53fab52960e23374599bb45d2080fa313cda973828246194d409903c91
Contents?: true
Size: 486 Bytes
Versions: 40
Compression:
Stored size: 486 Bytes
Contents
class Eco::API::Common::People::DefaultParsers::SendInvitesParser < Eco::API::Common::Loaders::Parser attribute "send_invites" def parser(hash, _deps) value = hash["send_invites"] value = value.first if value.is_a?(Array) truthy(value) end def serializer(person, _deps) return unless account = person.account account.send_invites&.to_s end private def truthy(value) %w[true y yes x].include?(value.to_s&.downcase) end end
Version data entries
40 entries across 40 versions & 1 rubygems