Class: ActionView::Helpers::Tags::Label::LabelBuilder
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | actionview/lib/action_view/helpers/tags/label.rb |
Class Method Summary
Instance Attribute Summary
- #object readonly
Instance Method Summary
Constructor Details
.new(template_object, object_name, method_name, object, tag_value) ⇒ LabelBuilder
Instance Attribute Details
#object (readonly)
[ GitHub ]# File 'actionview/lib/action_view/helpers/tags/label.rb', line 8
attr_reader :object
Instance Method Details
#to_s
[ GitHub ]# File 'actionview/lib/action_view/helpers/tags/label.rb', line 29
def to_s translation end
#translation
[ GitHub ]# File 'actionview/lib/action_view/helpers/tags/label.rb', line 18
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