Module: HungryForm::Elements
- Defined in:
- lib/hungryform/elements.rb,
lib/hungryform/elements/html.rb,
lib/hungryform/elements/page.rb,
lib/hungryform/elements/group.rb,
lib/hungryform/elements/text_area.rb,
lib/hungryform/elements/base/group.rb,
lib/hungryform/elements/text_field.rb,
lib/hungryform/elements/radio_group.rb,
lib/hungryform/elements/base/element.rb,
lib/hungryform/elements/select_field.rb,
lib/hungryform/elements/base/hashable.rb,
lib/hungryform/elements/checkbox_field.rb,
lib/hungryform/elements/base/active_element.rb,
lib/hungryform/elements/base/options_element.rb
Defined Under Namespace
Modules: Base Classes: CheckboxField, Group, Html, Page, RadioGroup, SelectField, TextArea, TextField
Class Method Summary collapse
- .all_classes ⇒ Object
-
.find_class(name) ⇒ Object
Find a class of the Elements module by name.
Class Method Details
.all_classes ⇒ Object
8 9 10 |
# File 'lib/hungryform/elements.rb', line 8 def self.all_classes constants.select { |c| Class === const_get(c) } end |
.find_class(name) ⇒ Object
Find a class of the Elements module by name
4 5 6 |
# File 'lib/hungryform/elements.rb', line 4 def self.find_class(name) constants.find { |c| Class === const_get(c) && c.to_s.underscore.to_sym == name } end |