Class: Search::CustomerTextPresenter

Inherits:
CustomerPresenter
  • Object
show all
Defined in:
app/presenters/search/customer_text_presenter.rb

Overview

Presenter: customer text presenter.

Delegated Instance Attributes collapse

Instance Method Summary collapse

Instance Method Details

#customerObject



4
5
6
# File 'app/presenters/search/customer_text_presenter.rb', line 4

def customer
  "#{r.full_name} (CN#{r.id})"
end

#customer_watch_symbolObject



12
13
14
15
16
# File 'app/presenters/search/customer_text_presenter.rb', line 12

def customer_watch_symbol
  return unless r.has_columns?(:watch, :open_sales_activity)

  h.y r.customer_watch
end

#drop_reasonsObject



28
29
30
# File 'app/presenters/search/customer_text_presenter.rb', line 28

def drop_reasons
  r.drop_reasons.join(' ')
end

#has_online_accountObject



22
23
24
# File 'app/presenters/search/customer_text_presenter.rb', line 22

def 
  h.y r.
end

#idObject



8
9
10
# File 'app/presenters/search/customer_text_presenter.rb', line 8

def id
  "CN#{r.id}"
end

#open_sales_activityObject



18
19
20
# File 'app/presenters/search/customer_text_presenter.rb', line 18

def open_sales_activity
  h.y r.open_sales_activity
end

#ratingObject

Alias for R#rating

Returns:

  • (Object)

    R#rating

See Also:



26
# File 'app/presenters/search/customer_text_presenter.rb', line 26

delegate :rating, to: :r