class Ariadne::Form::BaseComponent
:nodoc:
def self.inherited(base)
def self.inherited(base) base_path = Ariadne::Forms::Utils.const_source_location(base.name) unless base_path warn("Could not identify the template for #{base}") return end dir = File.dirname(base_path) base.renders_template(File.join(dir, "#{base.name.demodulize.underscore}.html.erb"), :render_template) end
def compile_and_render_template
def compile_and_render_template self.class.compile! if self.class.instance_methods(false).exclude?(:render_template) render_template end
def content
def content return @__prf_content if defined?(@__prf_content_evaluated) && @__prf_content_evaluated @__prf_content_evaluated = true @__prf_content = capture do @__prf_content_block.call end end
def content_tag_if(condition, tag, **kwargs, &block)
def content_tag_if(condition, tag, **kwargs, &block) if condition content_tag(tag, **kwargs, &block) else capture(&block) end end
def input?
def input? false end
def perform_render(&block)
def perform_render(&block) return "" unless render? @__prf_content_block = block compile_and_render_template end
def render?
def render? true end
def to_component
def to_component self end
def type
def type :component end