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

Returns:

  • (Boolean)


19
20
21
# File 'lib/formular/element/modules/label.rb', line 19

def has_label?
  !label_text.nil? && label_text != false
end

#label_optionsObject



23
24
25
# File 'lib/formular/element/modules/label.rb', line 23

def label_options
  @label_options ||= Attributes[options[:label_options]]
end

#label_textObject



15
16
17
# File 'lib/formular/element/modules/label.rb', line 15

def label_text
  options[:label]
end