Class: Primer::Forms::Dsl::RadioButtonGroupInput
- Defined in:
 - lib/primer/forms/dsl/radio_button_group_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
- 
  
    
      #label  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute label.
 - 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 - 
  
    
      #radio_buttons  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute radio_buttons.
 
Attributes inherited from Input
#base_id, #builder, #caption, #form, #form_control, #ids, #input_arguments, #label_arguments, #validation_message
Instance Method Summary collapse
- 
  
    
      #initialize(name:, label: nil, **system_arguments) {|_self| ... } ⇒ RadioButtonGroupInput 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of RadioButtonGroupInput.
 - #radio_button(**system_arguments, &block) ⇒ Object
 - #to_component ⇒ Object
 - #type ⇒ Object
 
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_arguments, #validation_error_icon_target, #validation_id, #validation_message_arguments, #validation_messages, #validation_success_icon_target
Methods included from ClassNameHelper
Constructor Details
#initialize(name:, label: nil, **system_arguments) {|_self| ... } ⇒ RadioButtonGroupInput
Returns a new instance of RadioButtonGroupInput.
      10 11 12 13 14 15 16 17 18  | 
    
      # File 'lib/primer/forms/dsl/radio_button_group_input.rb', line 10 def initialize(name:, label: nil, **system_arguments) @name = name @label = label @radio_buttons = [] super(**system_arguments) yield(self) if block_given? end  | 
  
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
      8 9 10  | 
    
      # File 'lib/primer/forms/dsl/radio_button_group_input.rb', line 8 def label @label end  | 
  
#name ⇒ Object (readonly)
Returns the value of attribute name.
      8 9 10  | 
    
      # File 'lib/primer/forms/dsl/radio_button_group_input.rb', line 8 def name @name end  | 
  
#radio_buttons ⇒ Object (readonly)
Returns the value of attribute radio_buttons.
      8 9 10  | 
    
      # File 'lib/primer/forms/dsl/radio_button_group_input.rb', line 8 def @radio_buttons end  | 
  
Instance Method Details
#radio_button(**system_arguments, &block) ⇒ Object
      28 29 30 31 32 33  | 
    
      # File 'lib/primer/forms/dsl/radio_button_group_input.rb', line 28 def (**system_arguments, &block) @radio_buttons << RadioButtonInput.new( builder: @builder, form: @form, name: @name, disabled: disabled?, **system_arguments, &block ) end  | 
  
#to_component ⇒ Object
      20 21 22  | 
    
      # File 'lib/primer/forms/dsl/radio_button_group_input.rb', line 20 def to_component RadioButtonGroup.new(input: self) end  | 
  
#type ⇒ Object
      24 25 26  | 
    
      # File 'lib/primer/forms/dsl/radio_button_group_input.rb', line 24 def type :radio_button_group end  |