Sha256: de536d453c4f00536c914766f4cf007e0c76210af5996d69aa64974751e5ab62

Contents?: true

Size: 475 Bytes

Versions: 1

Compression:

Stored size: 475 Bytes

Contents

# frozen_string_literal: true

require_relative "anian/version"
require_relative "anian/routing"

module Anian
  class Error < StandardError; end

  class Application
    def call(env)
      klass, act = get_controller_and_action(env)
      controller = klass.new(env)
      text = controller.send(act)
      [200, { "Content-Type" => "text/html" }, [text]]
    end
  end

  class Controller
    attr_accessor :env

    def initialize(env)
      @env = env
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
anian-0.2.1 lib/anian.rb