Class: Customer::Registered::BasicPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/customer/registered/basic_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource:) ⇒ BasicPresenter

Returns a new instance of BasicPresenter.



6
7
8
# File 'app/presenters/customer/registered/basic_presenter.rb', line 6

def initialize(resource:)
  @resource = resource
end

Instance Method Details

#to_hObject



10
11
12
13
14
# File 'app/presenters/customer/registered/basic_presenter.rb', line 10

def to_h
  return [] if resource.empty?

  basic_payload
end