Sha256: 5cccd3636aaad8a05d59d9eb3a448e8dd0aab8d5073e1ed1ea0d2ca357dcadb9

Contents?: true

Size: 672 Bytes

Versions: 15

Compression:

Stored size: 672 Bytes

Contents

# frozen_string_literal: true

module Weneedfeed
  module Views
    class ShowTopPage < ::Hibana::View
      # @param [Array<Hash>] page_schemata
      def initialize(page_schemata:, **argv)
        super(**argv)
        @page_schemata = page_schemata
      end

      private

      # @return [String]
      def base_path
        request.path.delete_suffix(router.path(:top_page))
      end

      # @param [String] page_id
      # @return [String]
      def feed_path(page_id:)
        "#{base_path}#{router.path(:feed, page_id: page_id)}"
      end

      # @return [Hanami::Router]
      def router
        ::Weneedfeed::Application.router
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
weneedfeed-0.15.0 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.14.0 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.13.0 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.12.0 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.11.0 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.10.0 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.9.2 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.9.1 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.9.0 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.8.0 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.7.2 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.7.1 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.7.0 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.6.1 lib/weneedfeed/views/show_top_page.rb
weneedfeed-0.6.0 lib/weneedfeed/views/show_top_page.rb