mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-22 22:06:45 +00:00
parser comments
This commit is contained in:
parent
f67519f091
commit
d450ab7c06
@ -134,14 +134,14 @@ module ValidatesTimeliness
|
|||||||
'_' => [ '\s?' ]
|
'_' => [ '\s?' ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Component values will be passed to the format method if matched in the
|
# Component argument values will be passed to the format method if matched in
|
||||||
# time string. The key should match the key defined in the format tokens.
|
# the time string. The key should match the key defined in the format tokens.
|
||||||
#
|
#
|
||||||
# The array consists of the position the argument should be inserted in
|
# The array consists of the position the value should be inserted in
|
||||||
# the time array, and the code to place in the time array. If the position
|
# the time array, and the code to place in the time array.
|
||||||
# is nil, then the argument won't be put in the time array.
|
|
||||||
#
|
#
|
||||||
# If the code slot is empty, then just the raw argument value is used.
|
# If the position is nil, then the value won't be put in the time array. If the
|
||||||
|
# code slot is empty, then just the raw value is used.
|
||||||
#
|
#
|
||||||
cattr_accessor :format_components
|
cattr_accessor :format_components
|
||||||
@@format_components = {
|
@@format_components = {
|
||||||
@ -349,7 +349,7 @@ module ValidatesTimeliness
|
|||||||
|
|
||||||
# Compiles a format method which maps the regexp capture groups to method
|
# Compiles a format method which maps the regexp capture groups to method
|
||||||
# arguments based on order captured. A time array is built using the argument
|
# arguments based on order captured. A time array is built using the argument
|
||||||
# values placed in the position defined by format component.
|
# values placed in the position defined by the component.
|
||||||
#
|
#
|
||||||
def compile_format_method(components, name)
|
def compile_format_method(components, name)
|
||||||
values = [nil] * 7
|
values = [nil] * 7
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user