Class: StringRule

Inherits:
Rule
  • Object
show all
Defined in:
lib/rules/StringRule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStringRule

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_lengthObject

Returns the value of attribute max_length.



4
5
6
# File 'lib/rules/StringRule.rb', line 4

def max_length
  @max_length
end

#min_lengthObject

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

#trainObject



15
16
17
# File 'lib/rules/StringRule.rb', line 15

def train()
  # TODO.
end

#validateObject



19
20
21
22
# File 'lib/rules/StringRule.rb', line 19

def validate()
  # TODO.
  true
end