Class: Spree::CSV::NewsletterSubscriberPresenter
- Inherits:
-
Object
- Object
- Spree::CSV::NewsletterSubscriberPresenter
- Includes:
- MetafieldsHelper
- Defined in:
- app/presenters/spree/csv/newsletter_subscriber_presenter.rb
Constant Summary collapse
- HEADERS =
[ 'Email', 'Customer Name', 'Customer ID', 'Verified', 'Verified At', 'Created At', 'Updated At' ].freeze
Instance Attribute Summary collapse
-
#newsletter_subscriber ⇒ Object
Returns the value of attribute newsletter_subscriber.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(newsletter_subscriber) ⇒ NewsletterSubscriberPresenter
constructor
A new instance of NewsletterSubscriberPresenter.
Constructor Details
#initialize(newsletter_subscriber) ⇒ NewsletterSubscriberPresenter
16 17 18 |
# File 'app/presenters/spree/csv/newsletter_subscriber_presenter.rb', line 16 def initialize() = end |
Instance Attribute Details
#newsletter_subscriber ⇒ Object
Returns the value of attribute newsletter_subscriber.
20 21 22 |
# File 'app/presenters/spree/csv/newsletter_subscriber_presenter.rb', line 20 def end |
Instance Method Details
#call ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/presenters/spree/csv/newsletter_subscriber_presenter.rb', line 22 def call csv = [ .email, .user&.full_name, .user_id, .verified? ? Spree.t(:say_yes) : Spree.t(:say_no), .verified_at, .created_at, .updated_at ] csv += () csv end |