Method: Pakyow::Presenter::View#component
- Defined in:
- lib/pakyow/presenter/view.rb
#component(name, renderable: false) ⇒ Object
Finds a component matching name
.
179 180 181 182 183 184 185 186 |
# File 'lib/pakyow/presenter/view.rb', line 179 def component(name, renderable: false) name = name.to_sym components(renderable: renderable).find { |component| component.object.label(:components).any? { |possible_component| possible_component[:name] == name } } end |