Module: Sinatra::Authentication::LoginField

Defined in:
lib/sinatra/authentication/login_field.rb

Class Method Summary collapse

Class Method Details

.attr_name(attr_name = nil) ⇒ Object



4
5
6
7
# File 'lib/sinatra/authentication/login_field.rb', line 4

def self.attr_name(attr_name = nil)
    @attr_name = attr_name.to_sym if attr_name
    @attr_name
end

.included(user) ⇒ Object



10
11
12
13
14
# File 'lib/sinatra/authentication/login_field.rb', line 10

def self.included(user)
    # NOTE these are Ohm specific, add some Ottoman-ORM shit if needed
    # user.attribute LoginField.attr_name
    # user.index LoginField.attr_name
end