class Chino::Website

Public Class Methods

setup(config) click to toggle source
# File lib/chino/website.rb, line 7
def self.setup(config)
  @@config = config
end

Public Instance Methods

output_for(path) click to toggle source
# File lib/chino/website.rb, line 15
def output_for(path)
  file = @@config.get_file(path)
  if file[:filename]
    send_file file[:filename]
  elsif file[:string]
    file[:string]
  else
    status 404
  end
end