Module: Lotus::Action

Defined in:
lib/lotus/action.rb,
lib/lotus/action/mime.rb,
lib/lotus/action/rack.rb,
lib/lotus/action/params.rb,
lib/lotus/action/cookies.rb,
lib/lotus/action/session.rb,
lib/lotus/action/callable.rb,
lib/lotus/action/redirect.rb,
lib/lotus/action/callbacks.rb,
lib/lotus/action/exposable.rb,
lib/lotus/action/throwable.rb,
lib/lotus/action/cookie_jar.rb

Overview

An HTTP endpoint

Examples:

require 'lotus/controller'

class Show
  include Lotus::Action

  def call(params)
    # ...
  end
end

Since:

  • 0.1.0

Defined Under Namespace

Modules: Callable, Callbacks, Cookies, Exposable, Mime, Rack, Redirect, Session, Throwable Classes: CookieJar, Params

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Since:

  • 0.1.0



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/lotus/action.rb', line 25

def self.included(base)
  base.class_eval do
    include Rack
    include Mime
    include Redirect
    include Exposable
    include Throwable
    include Callbacks
    prepend Callable
  end
end

Instance Method Details

#finishObject (protected)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method is abstract.

Finalize the response

This method is abstract and COULD be implemented by included modules in order to prepare their data before the reponse will be returned to the webserver.

See Also:

Since:

  • 0.1.0



52
53
# File 'lib/lotus/action.rb', line 52

def finish
end