Sha256: 5b3862752e105b09d6ecd208514dab2043a241d13c2e13b4ce87e4a3632a4f42
Contents?: true
Size: 503 Bytes
Versions: 178
Compression:
Stored size: 503 Bytes
Contents
# frozen_string_literal: true # Helps build a list of conditional class names module Ariadne # :nodoc: module ClassNameHelper def class_names(*args) [].tap do |classes| args.each do |class_name| next if class_name.blank? case class_name when String classes << class_name else raise ArgumentError, "Expected String class name, got #{class_name.class}" end end end.join(" ") end end end
Version data entries
178 entries across 178 versions & 1 rubygems