class SimpleForm::Wrappers::Single
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/simple_form/wrappers/single.rbs class SimpleForm::Wrappers::Single < SimpleForm::Wrappers::Many def render: (SimpleForm::Inputs::StringInput input) -> untyped end
‘Single` is an optimization for a wrapper that has only one component.
def html_options(options)
def html_options(options) %i[label input].include?(namespace) ? {} : super end
def initialize(name, wrapper_options = {}, options = {})
def initialize(name, wrapper_options = {}, options = {}) @component = Leaf.new(name, options) super(name, [@component], wrapper_options) end
def render(input)
Experimental RBS support (using type sampling data from the type_fusion
project).
def render: (SimpleForm::Inputs::StringInput input) -> untyped
This signature was generated using 1 sample from 1 application.
def render(input) options = input.options if options[namespace] != false content = @component.render(input) wrap(input, options, content) if content end end