lib/html-native/collections.rb
# Converts the RadioGroupComponent instance to the equivalent HTML. 
#
# *render* can be called directly, but that usually isn't necessary.
# HTMLComponent::Builder handles this automatically, so it only needs to be 
# done if there is no prior instance of one.
Converts the RadioGroupComponent instance to the equivalent HTML.
render* can be called directly, but that usually isn't necessary.
HTMLComponent::Builder handles this automatically, so it only needs to be
done if there is no prior instance of one.
Converts the RadioGroupComponent instance to the equivalent HTML . render * can be called directly but that usually isn ' t necessary . HTMLComponent :: Builder handles this automatically so it only needs to be done if there is no prior instance of one .
def render
    @choices.component_map do |c|
      id = "#{@name}-#{c}" 
      input({type: "radio", id: id, name: @name, value: c}) +
        (@labelled ? (_label({for: id}) {@block ? @block.call(c) : c}) : nil)
    end
  end
def render @choices . component_map do | c | id = "#{@name}-#{c}" input ( { type : "radio" , id : id , name : @name , value : c } ) + ( @labelled ? ( _label ( { for : id } ) { @block ? @block . call ( c ) : c } ) : nil ) end end
Converts the RadioGroupComponent instance to the equivalent HTML.
Converts the RadioGroupComponent instance to the equivalent HTML .