Module: Formular::Element::Modules::Label::InstanceMethods
- Defined in:
- lib/formular/element/modules/label.rb
Overview
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
Instance Method Summary collapse
Instance Method Details
#has_label? ⇒ Boolean
22 23 24 |
# File 'lib/formular/element/modules/label.rb', line 22 def has_label? !label_text.nil? && label_text != false end |
#label_options ⇒ Object
26 27 28 |
# File 'lib/formular/element/modules/label.rb', line 26 def @label_options ||= [:label_options] || {} end |
#label_text ⇒ Object
17 18 19 20 |
# File 'lib/formular/element/modules/label.rb', line 17 def label_text return if [:label].nil? || [:label] == false html_escape([:label]) end |