Class: RailsInfo::Logs::Server::ActionPresenter

Inherits:
Presenter
  • Object
show all
Defined in:
app/presenters/rails_info/logs/server/action_presenter.rb

Instance Method Summary collapse

Methods inherited from Presenter

#subject=

Constructor Details

#initialize(subject, options = {}) ⇒ ActionPresenter

Returns a new instance of ActionPresenter.



2
3
4
5
6
7
8
# File 'app/presenters/rails_info/logs/server/action_presenter.rb', line 2

def initialize(subject, options = {})
  super(subject, options)
  
  @name = options[:name]
  @tabs_data = options[:tabs_data]
  @index = options[:index] 
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RailsInfo::Presenter

Instance Method Details

#tabsObject



10
11
12
13
14
15
16
17
18
# File 'app/presenters/rails_info/logs/server/action_presenter.rb', line 10

def tabs     
  html =  :h3, link_to(@name, '#')
  
  html += (:div, class: 'tabs', id: "tabs-#{@index}") do
    raw(navigation) + raw(body) 
  end

  html
end