Module: MotionPrime::ScreenSectionsMixin::ClassMethods

Defined in:
motion-prime/screens/_sections_mixin.rb

Instance Method Summary collapse

Instance Method Details

#section(name, options = {}) ⇒ Object



52
53
54
55
56
57
58
59
# File 'motion-prime/screens/_sections_mixin.rb', line 52

def section(name, options = {})
  self._section_options ||= {}
  self._section_options[name.to_sym] = options.merge(name: name)

  define_method name do
    @sections[name]
  end
end