class Ariadne::ConditionalWrapper

the content is rendered.
is true, a ‘Ariadne::BaseComponent` will render around the content. If the condition is false, only
Conditionally renders a `Ariadne::BaseComponent` around the given content. If the given condition

def call

def call
  return content unless @condition
  BaseComponent.new(**@base_component_arguments).render_in(self) { content }
end

def initialize(condition:, **base_component_arguments)

Parameters:
  • base_component_arguments (Hash) -- The arguments to pass to `Ariadne::BaseComponent`.
  • condition (Boolean) -- Whether or not to wrap the content in a `Ariadne::BaseComponent`.
def initialize(condition:, **base_component_arguments)
  @condition = condition
  @base_component_arguments = base_component_arguments
end