-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor error messages, and data loading in page and blogs. add miss…
…ing dentaku functions
- Loading branch information
Steven Spriggs
committed
Feb 28, 2019
1 parent
3211477
commit f0a5d49
Showing
10 changed files
with
355 additions
and
343 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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module Dentaku | ||
module CustomFunctions | ||
FUNCTIONS = [ | ||
[ | ||
:length, | ||
:numeric, | ||
->(str) { str.length } | ||
], | ||
[ | ||
:blank, | ||
:logical, | ||
->(str) { str.blank? } | ||
], | ||
[ | ||
:contains, | ||
:logical, | ||
->(mainStr, subStr) { mainStr.include?(subStr) } | ||
], | ||
[ | ||
:startswith, | ||
:logical, | ||
->(mainStr, subStr) { mainStr.starts_with?(subStr) } | ||
], | ||
[ | ||
:endswith, | ||
:logical, | ||
->(mainStr, subStr) { mainStr.ends_with?(subStr) } | ||
], | ||
[ | ||
:matches, | ||
:logical, | ||
->(str, regexStr) { !Regexp.new(regexStr).match(str).nil? } | ||
] | ||
] | ||
end | ||
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
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
Oops, something went wrong.