-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added yard gem * add error documentation * readd error, will remove on merge * add yardoc files to gitignore * remove ignored files * will put error docs in separate branch * add error comments * remove check_configs and check_completed errors, methods, and tests * remove yard from gemspec * documentation for public core methods * core-documentation * initial model documentation * minor doc updateS
- Loading branch information
1 parent
e2ff378
commit 1dd4d5d
Showing
3 changed files
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
require 'securerandom' | ||
|
||
module TokenMaster | ||
# `TokenMaster::Core` provides the core functionality of the TokenMaster gem. The `Core` module performs all of the logic of completing tokenable actions, and provides descriptive messages of the status or abilities of calls made | ||
# `TokenMaster::Core` provides the core functionality of the TokenMaster gem. The `Core` module performs all of the logic of completing tokenable actions, and provides descriptive messages of the status or abilities of calls made. | ||
module Core | ||
class << self | ||
|
||
|
@@ -30,7 +30,7 @@ def do_by_token!(klass, key, token, **params) | |
model | ||
end | ||
|
||
# Completes the token action for a tokenable instance _without_ a token, setting the `tokenable_completed_at` to the time at completion<br /> Usually implemented when you want to complete multiple tokenable actions at once, e.g., a user completes the invite action by setting up passwords, by default also completes the confirm action | ||
# Completes the token action for a tokenable instance _without_ a token, setting the `tokenable_completed_at` to the time at completion.<br /> Usually implemented when you want to complete multiple tokenable actions at once, e.g., a user completes the invite action by setting up passwords, by default also completes the confirm action | ||
# @example Force a Tokenable Action (Confirm) | ||
# user.force_confirm! => | ||
# <User id: 205, name: "John Smith", email: "[email protected]", confirm_token: nil, confirm_created_at: nil, confirm_sent_at: nil, confirm_completed_at: "2017-04-25 14:17:13"> | ||
|
@@ -135,10 +135,6 @@ def token_lifetime(key) | |
TokenMaster.config.get_token_lifetime(key.to_sym) | ||
end | ||
|
||
def required_params(key) | ||
TokenMaster.config.get_required_params(key.to_sym) | ||
end | ||
|
||
def check_manageable!(klass, key) | ||
raise Errors::NotTokenable, "#{klass} not #{key}able" unless manageable?(klass, key) | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
module TokenMaster | ||
# Current version of TokenMaster | ||
VERSION = '0.0.1'.freeze | ||
end |