Class: StringRule
Instance Attribute Summary collapse
-
#max_length ⇒ Object
Returns the value of attribute max_length.
-
#min_length ⇒ Object
Returns the value of attribute min_length.
Instance Method Summary collapse
-
#initialize ⇒ StringRule
constructor
A new instance of StringRule.
- #load(value) ⇒ Object
- #train ⇒ Object
- #validate ⇒ Object
Constructor Details
#initialize ⇒ StringRule
Returns a new instance of StringRule.
6 7 8 9 |
# File 'lib/rules/StringRule.rb', line 6 def initialize() @min_length = nil @max_length = nil end |
Instance Attribute Details
#max_length ⇒ Object
Returns the value of attribute max_length.
4 5 6 |
# File 'lib/rules/StringRule.rb', line 4 def max_length @max_length end |
#min_length ⇒ Object
Returns the value of attribute min_length.
3 4 5 |
# File 'lib/rules/StringRule.rb', line 3 def min_length @min_length end |
Instance Method Details
#load(value) ⇒ Object
11 12 13 |
# File 'lib/rules/StringRule.rb', line 11 def load(value) @values << value end |
#train ⇒ Object
15 16 17 |
# File 'lib/rules/StringRule.rb', line 15 def train() # TODO. end |
#validate ⇒ Object
19 20 21 22 |
# File 'lib/rules/StringRule.rb', line 19 def validate() # TODO. true end |