Class: Primer::Forms::Dsl::TextAreaInput

Inherits:
Input
  • Object
show all
Defined in:
lib/primer/forms/dsl/text_area_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

#base_id, #builder, #caption, #form, #form_control, #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?, #full_width?, #hidden?, #input?, #invalid?, #merge_input_arguments!, #remove_input_data, #render_caption_template, #required?, #size, #valid?, #validation_arguments, #validation_error_icon_target, #validation_id, #validation_message_arguments, #validation_messages, #validation_success_icon_target

Methods included from ClassNameHelper

#class_names

Constructor Details

#initialize(name:, label:, **system_arguments) ⇒ TextAreaInput

Returns a new instance of TextAreaInput.



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

def initialize(name:, label:, **system_arguments)
  @name = name
  @label = label

  super(**system_arguments)
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



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

def label
  @label
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#focusable?Boolean

:nocov:

Returns:

  • (Boolean)


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

def focusable?
  true
end

#to_componentObject



17
18
19
# File 'lib/primer/forms/dsl/text_area_input.rb', line 17

def to_component
  TextArea.new(input: self)
end

#typeObject



21
22
23
# File 'lib/primer/forms/dsl/text_area_input.rb', line 21

def type
  :text_area
end