Class: Primer::Forms::Dsl::FormReferenceInput

Inherits:
Input
  • Object
show all
Defined in:
lib/primer/forms/dsl/form_reference_input.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Input

Input::DEFAULT_SIZE, Input::SIZE_MAPPINGS, Input::SIZE_OPTIONS, Input::SPACE_DELIMITED_ARIA_ATTRIBUTES

Instance Attribute Summary collapse

Attributes inherited from Input

#builder, #caption, #form, #ids, #input_arguments, #label_arguments, #validation_message

Instance Method Summary collapse

Methods inherited from Input

#add_input_aria, #add_input_classes, #add_input_data, #add_label_classes, #autofocus!, #caption?, #caption_id, #caption_template?, #disabled?, #focusable?, #full_width?, #hidden?, #input?, #invalid?, #merge_input_arguments!, #remove_input_data, #render_caption_template, #required?, #size, #valid?, #validation_id, #validation_messages

Methods included from ClassNameHelper

#class_names

Constructor Details

#initialize(*fields_for_args, builder:, form:, **fields_for_kwargs, &block) ⇒ FormReferenceInput

Returns a new instance of FormReferenceInput.



10
11
12
13
14
15
16
# File 'lib/primer/forms/dsl/form_reference_input.rb', line 10

def initialize(*fields_for_args, builder:, form:, **fields_for_kwargs, &block)
  @fields_for_args = fields_for_args
  @fields_for_kwargs = fields_for_kwargs
  @ref_block = block

  super(builder: builder, form: form, **fields_for_kwargs)
end

Instance Attribute Details

#fields_for_argsObject (readonly)

Returns the value of attribute fields_for_args.



8
9
10
# File 'lib/primer/forms/dsl/form_reference_input.rb', line 8

def fields_for_args
  @fields_for_args
end

#fields_for_kwargsObject (readonly)

Returns the value of attribute fields_for_kwargs.



8
9
10
# File 'lib/primer/forms/dsl/form_reference_input.rb', line 8

def fields_for_kwargs
  @fields_for_kwargs
end

#ref_blockObject (readonly)

Returns the value of attribute ref_block.



8
9
10
# File 'lib/primer/forms/dsl/form_reference_input.rb', line 8

def ref_block
  @ref_block
end

Instance Method Details

#labelObject



26
27
28
# File 'lib/primer/forms/dsl/form_reference_input.rb', line 26

def label
  nil
end

#nameObject



22
23
24
# File 'lib/primer/forms/dsl/form_reference_input.rb', line 22

def name
  nil
end

#to_componentObject



18
19
20
# File 'lib/primer/forms/dsl/form_reference_input.rb', line 18

def to_component
  FormReference.new(input: self)
end

#typeObject



30
31
32
# File 'lib/primer/forms/dsl/form_reference_input.rb', line 30

def type
  :form
end