Sha256: 5ab7a9a1c698c19d2f782d9331dbdc83ebe4f17e67b074e15db4e5f74c01c935
Contents?: true
Size: 673 Bytes
Versions: 13
Compression:
Stored size: 673 Bytes
Contents
# frozen_string_literal: true require 'hibana' module Weneedfeed class Application < ::Hibana::Application route do get '/', to: ::Weneedfeed::Controllers::ShowTopPage, as: :top_page get '/feeds/:page_id.xml', to: ::Weneedfeed::Controllers::ShowFeed, as: :feed end # @param [Hash] schema def initialize(schema:) @schema = ::Weneedfeed::Schema.new(schema) super() end # @param [Hash] env def call(env) env['weneedfeed.schema'] = @schema super end # @return [Array<String>] def paths ['/'] + @schema.page_ids.map do |page_id| "/feeds/#{page_id}.xml" end end end end
Version data entries
13 entries across 13 versions & 1 rubygems