Module: Cell::Layout

Included in:
ViewModel
Defined in:
lib/cell/layout.rb

Overview

Set the layout per cell class. This is used in #render calls. Gets inherited to subclasses.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
# File 'lib/cell/layout.rb', line 4

def self.included(base)
  base.extend ClassMethods
  base.inheritable_attr :layout_name
end

Instance Method Details

#process_options!(options) ⇒ Object



15
16
17
18
# File 'lib/cell/layout.rb', line 15

def process_options!(options)
  options[:layout] ||= self.class.layout_name
  super
end