Class: Fidelity::WidgetHelper
- Inherits:
-
Object
- Object
- Fidelity::WidgetHelper
- Includes:
- ActionView::Helpers
- Defined in:
- lib/fidelity/widget_helper.rb
Instance Method Summary collapse
- #class_name_if?(test = nil, name = 'active') ⇒ Boolean
- #select_first(*arguments) ⇒ Object
- #to_class_name(*arguments) ⇒ Object
Instance Method Details
#class_name_if?(test = nil, name = 'active') ⇒ Boolean
13 14 15 |
# File 'lib/fidelity/widget_helper.rb', line 13 def class_name_if? test=nil, name='active' test ? name : '' end |
#select_first(*arguments) ⇒ Object
5 6 7 |
# File 'lib/fidelity/widget_helper.rb', line 5 def select_first *arguments arguments.compact.first end |
#to_class_name(*arguments) ⇒ Object
9 10 11 |
# File 'lib/fidelity/widget_helper.rb', line 9 def to_class_name *arguments arguments.compact.map(&:to_s).join(' ') end |