Class: Search::RoomConfigurationTextPresenter
- Inherits:
-
RoomConfigurationPresenter
- Object
- RoomConfigurationPresenter
- Search::RoomConfigurationTextPresenter
- Defined in:
- app/presenters/search/room_configuration_text_presenter.rb
Overview
Text-only variant of RoomConfigurationPresenter.
Instance Method Summary collapse
-
#customer_link ⇒ String?
Returns the customer name and account number as plain text, if available.
-
#has_quotes ⇒ String
Returns a "Yes"/"No" label for the has_quotes flag.
-
#opportunity_link ⇒ String?
Returns the associated opportunity name as plain text, if available.
-
#priority_label ⇒ String
Returns the priority value as plain text.
-
#room_link ⇒ String
Returns the room reference number as plain text.
-
#state ⇒ String
Returns the human-readable state name.
Instance Method Details
#customer_link ⇒ String?
Returns the customer name and account number as plain text, if available.
40 41 42 43 44 |
# File 'app/presenters/search/room_configuration_text_presenter.rb', line 40 def customer_link return unless r.has_columns?(:customer_full_name, :customer_id) "#{r.customer_full_name} (CN#{r.customer_id})" end |
#has_quotes ⇒ String
Returns a "Yes"/"No" label for the has_quotes flag.
49 50 51 |
# File 'app/presenters/search/room_configuration_text_presenter.rb', line 49 def has_quotes h.y r.has_quotes end |
#opportunity_link ⇒ String?
Returns the associated opportunity name as plain text, if available.
24 25 26 27 28 |
# File 'app/presenters/search/room_configuration_text_presenter.rb', line 24 def opportunity_link return unless r.has_columns?(:opportunity_name, :opportunity_id) r.opportunity_name end |
#priority_label ⇒ String
Returns the priority value as plain text.
10 11 12 |
# File 'app/presenters/search/room_configuration_text_presenter.rb', line 10 def priority_label r.priority end |
#room_link ⇒ String
Returns the room reference number as plain text.
17 18 19 |
# File 'app/presenters/search/room_configuration_text_presenter.rb', line 17 def room_link r.reference_number end |
#state ⇒ String
Returns the human-readable state name.
33 34 35 |
# File 'app/presenters/search/room_configuration_text_presenter.rb', line 33 def state RoomConfiguration.human_state_name(r.state) end |