Module: Pakyow::Application::Behavior::UI::Recording

Extended by:
Support::Extension
Defined in:
lib/pakyow/application/behavior/ui/recording.rb

Instance Method Summary collapse

Instance Method Details

#find_ui_presenter_for(presenter_class) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/pakyow/application/behavior/ui/recording.rb', line 15

def find_ui_presenter_for(presenter_class)
  if is_a?(Plugin)
    # Look for the presenter in the plugin first, falling back to the app.
    #
    ui_presenter_class = parent.ui_presenters.find { |klass|
      klass.ancestors.include?(presenter_class)
    }
  end

  ui_presenter_class ||= @ui_presenters.find { |klass|
    klass.ancestors.include?(presenter_class)
  }
end