Sha256: e48fccacf9858c8554811d51718dbac047390618a4e44e7b78cc0d4c2b2644e1
Contents?: true
Size: 468 Bytes
Versions: 23
Compression:
Stored size: 468 Bytes
Contents
# frozen_string_literal: true # :nocov: module Ariadne # Module to allow shorthand calls for Ariadne components module ViewHelper class ViewHelperNotFound < StandardError; end HELPERS = { heroicon: "Ariadne::UI::Heroicon::Component", }.freeze HELPERS.each do |name, component| define_method :"ariadne_#{name}" do |*args, **kwargs, &block| render component.constantize.new(*args, **kwargs), &block end end end end
Version data entries
23 entries across 23 versions & 1 rubygems