Module: Sinatra::SimpleAuthentication::Models::DataMapper::Adapter
- Included in:
- DmUser
- Defined in:
- lib/sinatra/simple_authentication/models/datamapper/adapter.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Attribute Summary collapse
-
.model_class ⇒ Object
Returns the value of attribute model_class.
Class Method Summary collapse
Class Attribute Details
.model_class ⇒ Object
Returns the value of attribute model_class.
10 11 12 |
# File 'lib/sinatra/simple_authentication/models/datamapper/adapter.rb', line 10 def model_class @model_class end |
Class Method Details
.included(base) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/sinatra/simple_authentication/models/datamapper/adapter.rb', line 12 def self.included(base) self.model_class = base base.extend ClassMethods base.class_eval do base.property :id, ::DataMapper::Property::Serial base.property :email, ::DataMapper::Property::String base.property :hashed_password, ::DataMapper::Property::String base.property :salt, ::DataMapper::Property::String include InstanceMethods end end |