module Formular::Element::Modules::Label::InstanceMethods

options functionality: options == String return the string currently we don't infer label text so if you don't include label as an option, you wont get one rendered

Public Instance Methods

has_label?() click to toggle source
# File lib/formular/element/modules/label.rb, line 22
def has_label?
  !label_text.nil? && label_text != false
end
label_options() click to toggle source
# File lib/formular/element/modules/label.rb, line 26
def label_options
  @label_options ||= options[:label_options] || {}
end
label_text() click to toggle source
# File lib/formular/element/modules/label.rb, line 17
def label_text
  return if options[:label].nil? || options[:label] == false
  html_escape(options[:label])
end