Sha256: ef4847da25eb793c15b4074b28005bd3f0740984d57fff329160c8f47a33b99d
Contents?: true
Size: 812 Bytes
Versions: 5
Compression:
Stored size: 812 Bytes
Contents
# frozen_string_literal: true module Ariadne module Forms module Dsl # :nodoc: class FormObject include InputMethods attr_reader :builder, :form, :id def initialize(builder:, form:, id: ::Ariadne.generate_id) @builder = builder @form = form @id = id yield(self) if block_given? end def group(**options, &block) add_input(InputGroup.new(builder: @builder, form: @form, **options, &block)) end def button(**options, &block) add_input(ButtonInput.new(builder: @builder, form: @form, **options, &block)) end def badge(**options, &block) add_input(Badge.new(builder: @builder, form: @form, **options, &block)) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems