Sha256: 40cee67c15a2eb7c0c837cc25a9de9e40c234ee92278735944690f7ad03bb00e

Contents?: true

Size: 646 Bytes

Versions: 6

Compression:

Stored size: 646 Bytes

Contents

# frozen_string_literal: true

module Weneedfeed
  module Views
    class ShowOpml < Base
      # @param [Weneedfeed::Schema] schema
      def initialize(schema:, **argv)
        super(**argv)
        @schema = schema
      end

      private

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

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

      # @return [Array<String>]
      def page_schemata
        @schema.page_schemata.sort_by(&:title)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
weneedfeed-0.20.0 lib/weneedfeed/views/show_opml.rb
weneedfeed-0.19.3 lib/weneedfeed/views/show_opml.rb
weneedfeed-0.19.2 lib/weneedfeed/views/show_opml.rb
weneedfeed-0.19.1 lib/weneedfeed/views/show_opml.rb
weneedfeed-0.19.0 lib/weneedfeed/views/show_opml.rb
weneedfeed-0.18.0 lib/weneedfeed/views/show_opml.rb