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
7
8
9
|
# File 'app/models/spree_cm_commissioner/product_completion_step.rb', line 7
def action_url_for(_line_item)
nil
end
|
#completed?(_line_item) ⇒ Boolean
11
12
13
|
# File 'app/models/spree_cm_commissioner/product_completion_step.rb', line 11
def completed?(_line_item)
raise 'completed? should be implemented in a sub-class of ProductCompletionStep'
end
|
#construct_hash(line_item:) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/models/spree_cm_commissioner/product_completion_step.rb', line 15
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
|