Class: SexyForm::Themes::BaseTheme
- Inherits:
-
Object
- Object
- SexyForm::Themes::BaseTheme
- Defined in:
- lib/sexy_form/themes/base_theme.rb
Direct Known Subclasses
Bootstrap2Horizontal, Bootstrap2Inline, Bootstrap2Vertical, Bootstrap3Horizontal, Bootstrap3Inline, Bootstrap3Vertical, Bootstrap4Horizontal, Bootstrap4Inline, Bootstrap4Vertical, BulmaHorizontal, BulmaVertical, Default, Foundation, Materialize, Milligram, SemanticUIInline, SemanticUIVertical
Class Method Summary collapse
Class Method Details
.theme_name ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/sexy_form/themes/base_theme.rb', line 5 def self.theme_name the_name = self.name.to_s.split("::").last underscored_name = the_name .gsub(/::/, '/') .gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2') .gsub(/([a-z\d])([A-Z])/,'\1_\2') .tr("-", "_") .downcase underscored_name end |