Class: ServicePresenter

Inherits:
BasePresenter show all
Defined in:
app/presenters/service_presenter.rb

Instance Method Summary collapse

Methods inherited from BasePresenter

as_collection

Constructor Details

#initialize(service) ⇒ ServicePresenter


2
3
4
# File 'app/presenters/service_presenter.rb', line 2

def initialize(service)
  @service = service
end

Instance Method Details

#as_jsonObject


6
7
8
9
10
# File 'app/presenters/service_presenter.rb', line 6

def as_json
  {
    :provider => @service.provider
  }
end

#to_json(options = {}) ⇒ Object


12
13
14
# File 'app/presenters/service_presenter.rb', line 12

def to_json(options = {})
  as_json.to_json(options)
end