Module: Cell::ViewModel::Helpers

Included in:
Cell::ViewModel
Defined in:
lib/cell/view_model.rb

Instance Method Summary collapse

Instance Method Details

#cell(name, *args, &block) ⇒ Object

Constantizes name if needed, call builders and returns instance.



31
32
33
34
# File 'lib/cell/view_model.rb', line 31

def cell(name, *args, &block) # classic Rails fuzzy API.
  constant = name.is_a?(Class) ? name : class_from_cell_name(name)
  constant.(*args, &block)
end