Module: HanamiId
- Defined in:
- lib/hanami_id.rb,
lib/hanami_id/version.rb,
lib/hanami_id/authentication.rb,
lib/hanami_id/warden/app_helper.rb
Defined Under Namespace
Modules: Authentication, Warden Classes: AuthError
Constant Summary collapse
- MODES =
%w[standalone project].freeze
- MODULES =
%w[sessions registrations].freeze
- VERSION =
"0.2.1"
Class Attribute Summary collapse
-
.app_name ⇒ Object
Returns the value of attribute app_name.
-
.default_modules ⇒ Object
Returns the value of attribute default_modules.
-
.failure_app ⇒ Object
Returns the value of attribute failure_app.
-
.logger ⇒ Object
Returns the value of attribute logger.
-
.model_name ⇒ Object
Returns the value of attribute model_name.
Class Method Summary collapse
- .app ⇒ Object
- .classify(string) ⇒ Object
- .configure {|_self| ... } ⇒ Object
- .model ⇒ Object
- .repository ⇒ Object
- .repository_name ⇒ Object
Class Attribute Details
.app_name ⇒ Object
Returns the value of attribute app_name.
23 24 25 |
# File 'lib/hanami_id.rb', line 23 def app_name @app_name end |
.default_modules ⇒ Object
Returns the value of attribute default_modules.
25 26 27 |
# File 'lib/hanami_id.rb', line 25 def default_modules @default_modules end |
.failure_app ⇒ Object
Returns the value of attribute failure_app.
24 25 26 |
# File 'lib/hanami_id.rb', line 24 def failure_app @failure_app end |
.logger ⇒ Object
Returns the value of attribute logger.
21 22 23 |
# File 'lib/hanami_id.rb', line 21 def logger @logger end |
.model_name ⇒ Object
Returns the value of attribute model_name.
22 23 24 |
# File 'lib/hanami_id.rb', line 22 def model_name @model_name end |
Class Method Details
.app ⇒ Object
47 48 49 |
# File 'lib/hanami_id.rb', line 47 def app @app ||= Module.const_get(@app_name) end |
.classify(string) ⇒ Object
43 44 45 |
# File 'lib/hanami_id.rb', line 43 def classify(string) Hanami::Utils::String.classify string end |
.configure {|_self| ... } ⇒ Object
27 28 29 |
# File 'lib/hanami_id.rb', line 27 def configure yield self end |
.model ⇒ Object
31 32 33 |
# File 'lib/hanami_id.rb', line 31 def model @model ||= Module.const_get(classify(@model_name)) end |
.repository ⇒ Object
39 40 41 |
# File 'lib/hanami_id.rb', line 39 def repository @repository ||= Module.const_get("#{classify @model_name}Repository") end |
.repository_name ⇒ Object
35 36 37 |
# File 'lib/hanami_id.rb', line 35 def repository_name @repository_name ||= "#{@model_name}_repository" end |