lib/renee.rb in renee-0.1.0 vs lib/renee.rb in renee-0.1.1
- old
+ new
@@ -1,32 +1,31 @@
require 'renee-core'
require 'renee-render'
require 'renee/version'
+# Method for creating new Renee applications.
+# @see http://reneerb.com
+# @example
+# run Renee {
+# halt "hello renee"
+# }
+def Renee(&blk)
+ Renee::RichCore.new(&blk)
+end
+
+# Top-level Renee constant.
class Renee
+ # Analogous to {Renee::Core}, but with all features enabled.
+ # @see http://reneerb.com
class RichCore < Renee::Core
+ # Creates a new Renee application.
+ # @yield The application definition.
def initialize(&blk)
- super
+ super(Application, &blk)
end
- def call(env)
- application_class.new(settings, &application_block).call(env)
- end
- alias_method :[], :call
-
- def application_class
- @application_class ||= begin
- app_cls = Class.new(Application)
- settings.includes.each { |inc| app_cls.send(:include, inc) }
- app_cls
- end
- end
-
+ # @private
class Application < Renee::Core::Application
include Renee::Render
end
end
end
-
-def Renee(&blk)
- Renee::RichCore.new(&blk)
-end
\ No newline at end of file