Module: Auth::BehaviorLookup

Included in:
Configuration, Configuration, Model
Defined in:
lib/auth/behavior_lookup.rb

Instance Method Summary collapse

Instance Method Details

#lookup_behavior(behavior) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/auth/behavior_lookup.rb', line 2

def lookup_behavior(behavior)
  name = behavior.to_s.camelize
  if name[/^Auth::Behavior::/]
    name.constantize
  else
    "Auth::Behavior::#{name}".constantize
  end
end