Class: RailsInfo::Logs::Test::Rspec::FilePresenter
- Defined in:
- app/presenters/rails_info/logs/test/rspec/file_presenter.rb
Instance Method Summary collapse
-
#initialize(subject, options = {}) ⇒ FilePresenter
constructor
A new instance of FilePresenter.
- #tabs ⇒ Object
Methods inherited from Presenter
Constructor Details
#initialize(subject, options = {}) ⇒ FilePresenter
Returns a new instance of FilePresenter.
2 3 4 5 6 7 8 9 |
# File 'app/presenters/rails_info/logs/test/rspec/file_presenter.rb', line 2 def initialize(subject, = {}) super(subject, ) @name = [:name] @tabs_data = [:tabs_data] @index = [:index] @rails_root = [:rails_root] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RailsInfo::Presenter
Instance Method Details
#tabs ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/presenters/rails_info/logs/test/rspec/file_presenter.rb', line 11 def tabs html = content_tag :h3, link_to(@name, '#') html += content_tag(:div, class: 'tabs', id: "#{@name.parameterize}-tabs-#{@index}") do raw() + raw(body) end html end |