Sha256: ff52c93f6824605ff0c9294d00dc10952bd7629503aa3ea951e293eeba9e79f6
Contents?: true
Size: 1.26 KB
Versions: 3
Compression:
Stored size: 1.26 KB
Contents
# frozen_string_literal: true module Intranet # The default implementation and interface of an Intranet module. class AbstractResponder # Destroys the responder instance. # This method gets called when server is shut down. def finalize # nothing to do end # Generates the HTML content associated to the given +path+ and +query+. # @param path [String] The requested URI, relative to that module root URI # @param query [Hash] The URI variable/value pairs, if any # @return [Array] The HTTP return code, the MIME type and the answer body. def generate_page(path, query) [404, '', ''] end # Provides the list of Cascade Style Sheets (CSS) dependencies for this module. # If redefined, this method should probably append dependencies rather than overwriting them. # @return [Array] The list of CSS dependencies, as URL path from server root def css_dependencies ['/design/style.css'] end # Provides the list of Javascript files (JS) dependencies for this module. # If redefined, this method should probably append dependencies rather than overwriting them. # @return [Array] The list of JS dependencies, as URL path from server root def js_dependencies ['/design/nav.js'] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
intranet-core-1.0.2 | lib/intranet/abstract_responder.rb |
intranet-core-1.0.1 | lib/intranet/abstract_responder.rb |
intranet-core-1.0.0 | lib/intranet/abstract_responder.rb |