class Nyauth::Nyan
Public Class Methods
_on_test_request()
click to toggle source
# File lib/nyauth/nyan.rb, line 28 def self._on_test_request @@_on_test_request ||= [] end
new(env)
click to toggle source
# File lib/nyauth/nyan.rb, line 5 def initialize(env) @env = env end
on_test_request(options = {}, &block)
click to toggle source
# File lib/nyauth/nyan.rb, line 24 def self.on_test_request(options = {}, &block) _on_test_request.push([block, options]) end
run_callback(nyan) { || ... }
click to toggle source
# File lib/nyauth/nyan.rb, line 13 def self.run_callback(nyan, &block) %w(on_test_request).each do |kind| __send__("_#{kind}").each do |callback, options| callback.call(nyan, *options) end end @@_on_test_request = [] yield end
Public Instance Methods
session()
click to toggle source
# File lib/nyauth/nyan.rb, line 9 def session @serializer ||= Nyauth::SessionSerializer.new(@env) end