Class: TemplatePresenter

Inherits:
ApplicationPresenter show all
Defined in:
app/presenters/template_presenter.rb

Instance Method Summary collapse

Methods inherited from ApplicationPresenter

#h, #model, model, #route

Instance Method Details

#all_eventsObject



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/presenters/template_presenter.rb', line 4

def all_events
  events = []
  Nuntius.config.nuntiable_class_names.each do |class_name|
    next if class_name == "Custom"

    messenger = Nuntius::BaseMessenger.messenger_for_class(class_name)
    messenger.instance_methods(false).each do |m|
      events << [m, m, {"data-chain": class_name,
                        "data-timebased": messenger.timebased_scopes.include?(m) ? "Y" : "N"}]
    end
  end
  events.sort_by(&:first)
end