Class: Postnhost::PublicNavigationTargets
- Inherits:
-
BaseService
- Object
- BaseService
- Postnhost::PublicNavigationTargets
- Defined in:
- app/services/postnhost/public_navigation_targets.rb
Defined Under Namespace
Classes: Targets
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(items:, language:) ⇒ PublicNavigationTargets
constructor
A new instance of PublicNavigationTargets.
Methods inherited from BaseService
Constructor Details
#initialize(items:, language:) ⇒ PublicNavigationTargets
Returns a new instance of PublicNavigationTargets.
5 6 7 8 |
# File 'app/services/postnhost/public_navigation_targets.rb', line 5 def initialize(items:, language:) @items = items @language = language end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'app/services/postnhost/public_navigation_targets.rb', line 10 def call records = { "article" => article_snapshots, "page" => page_snapshots, "category" => categories } success(Targets.new(records:, variants: variants_for(records))) end |