Module: ProMotion::FormScreenStyle
- Included in:
- FormScreen
- Defined in:
- lib/ProMotion/form/form_screen_style.rb
Instance Method Summary collapse
Instance Method Details
#style(*ary) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/ProMotion/form/form_screen_style.rb', line 3 def style(*ary) @form_styles ||= styles @form_styles_cache ||= {} @form_styles_cache[ary * ':'] ||= ary.inject(PM::FormStyle.new) do |all, one| one ? (all << @form_styles[one]) : all end end |
#style!(*ary) ⇒ Object
11 12 13 14 |
# File 'lib/ProMotion/form/form_screen_style.rb', line 11 def style!(*ary) @form_style_sticky = ary.empty? ? nil : ary style(*ary) end |
#style?(*ary) ⇒ Boolean
16 17 18 19 |
# File 'lib/ProMotion/form/form_screen_style.rb', line 16 def style?(*ary) ary.unshift(*@form_style_sticky) if @form_style_sticky style(*ary) end |