Class: SpreeCmCommissioner::ProductCompletionStep
- Inherits:
-
Base
- Object
- Spree::Base
- Base
- SpreeCmCommissioner::ProductCompletionStep
show all
- Defined in:
- app/models/spree_cm_commissioner/product_completion_step.rb
Instance Method Summary
collapse
Instance Method Details
#action_url_for(_line_item) ⇒ Object
11
12
13
|
# File 'app/models/spree_cm_commissioner/product_completion_step.rb', line 11
def action_url_for(_line_item)
nil
end
|
#completed?(_line_item) ⇒ Boolean
15
16
17
|
# File 'app/models/spree_cm_commissioner/product_completion_step.rb', line 15
def completed?(_line_item)
raise 'completed? should be implemented in a sub-class of ProductCompletionStep'
end
|
#construct_hash(line_item:) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# File 'app/models/spree_cm_commissioner/product_completion_step.rb', line 19
def construct_hash(line_item:)
{
title: title,
type: type&.underscore,
position: position,
description: description,
action_label: action_label,
action_url: action_url_for(line_item),
completed: completed?(line_item)
}
end
|