Class: Beamer::Loader::LoadWithDemodulizedFallback

Inherits:
Base
  • Object
show all
Defined in:
lib/beamer/loader/load_with_demodulized_fallback.rb

Instance Attribute Summary

Attributes inherited from Base

#object, #view_context

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Beamer::Loader::Base

Instance Method Details

#load_presenterObject



6
7
8
9
10
11
12
13
14
# File 'lib/beamer/loader/load_with_demodulized_fallback.rb', line 6

def load_presenter
  load_by_class_name = LoadByClassName.new(object, view_context)
  if presenter = load_by_class_name.load_presenter
    presenter
  else
    load_by_demodulized_class_name = LoadByDemodulizedClassName.new(object, view_context)
    load_by_demodulized_class_name.load_presenter
  end
end