Class: NavGate::Builder
Instance Attribute Summary
Attributes inherited from Base
#by_id, #controller, #css_class, #css_selected, #default, #prefix, #selection
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from NavGate::Base
Instance Method Details
#render_it_with(options, selected) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/navgate/builder.rb', line 4 def render_it_with(,selected) = "" if self.css_class if && [:class] [:class] = self.css_class else = { class: self.css_class} end end if .each do |key,value| += ("#{key}='#{value}'" + " ") unless ignoring key end end style = styling() @text_to_render = "" selected.gsub!('/',"") if !self.by_id self.selection.each do |select| @text_to_render += select_text_for(select,selected,[:wrap],,style) end else self.selection.each_with_index do |select,i| @text_to_render += select_text_for(select,selected,[:wrap],,style,i) end end @text_to_render end |