Class: CaseForm::Element::Hint

Inherits:
Base
  • Object
show all
Defined in:
lib/case_form/element/hint.rb

Constant Summary

Constants inherited from Base

Base::HTML_OPTIONS

Instance Attribute Summary collapse

Attributes inherited from Base

#builder, #options

Instance Method Summary collapse

Methods included from CaseForm::ElementExt::Naming

#object_human_model_name, #sanitized_object_name, #singularize_model_name

Constructor Details

#initialize(builder, method, options = {}) ⇒ Hint

Initialize hint’s object



10
11
12
13
# File 'lib/case_form/element/hint.rb', line 10

def initialize(builder, method, options={})
  @method = method
  super(builder, options)
end

Instance Attribute Details

#methodObject

Returns the value of attribute method.



6
7
8
# File 'lib/case_form/element/hint.rb', line 6

def method
  @method
end

Instance Method Details

#generateObject

Generate hint with defined text and HTML options



17
18
19
# File 'lib/case_form/element/hint.rb', line 17

def generate
  template.(hint_tag, text, html_options)
end