Class: TesterPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/tester_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(testers) ⇒ TesterPresenter

Returns a new instance of TesterPresenter.



3
4
5
# File 'app/presenters/tester_presenter.rb', line 3

def initialize(testers)
  @testers = testers
end

Instance Method Details

#as_json(*args) ⇒ Object



7
8
9
10
11
12
13
# File 'app/presenters/tester_presenter.rb', line 7

def as_json(*args)
  @testers.map do |tester|
    { id: tester.id,
      name: tester.name,
      email: tester.email }
  end
end