class ActionView::Helpers::Tags::Label::LabelBuilder
:nodoc:
:nodoc:
:nodoc:
def initialize(template_object, object_name, method_name, object, tag_value)
def initialize(template_object, object_name, method_name, object, tag_value) @template_object = template_object @object_name = object_name @method_name = method_name @object = object @tag_value = tag_value end
def to_s
def to_s translation end
def translation
def translation method_and_value = @tag_value.present? ? "#{@method_name}.#{@tag_value}" : @method_name content ||= Translator .new(object, @object_name, method_and_value, scope: "helpers.label") .translate content ||= @method_name.humanize content end