Sha256: c66f119d4eba633668668fb463f79e876fb0367a7c424a92082411f10be40ab7
Contents?: true
Size: 658 Bytes
Versions: 5
Compression:
Stored size: 658 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_name.xml', to: ::Weneedfeed::Controllers::ShowFeed, as: :feed end # @param [Hash] schema def initialize(schema:) @schema = schema super() end # @param [Hash] env def call(env) env['weneedfeed.schema'] = @schema super end # @return [Array<String>] def paths ['/'] + @schema['pages'].keys.map do |page_name| "/feeds/#{page_name}.xml" end end end end
Version data entries
5 entries across 5 versions & 1 rubygems