Class: Rule

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

Direct Known Subclasses

FloatRule, IntegerRule, StringRule

Instance Method Summary collapse

Constructor Details

#initializeRule

Each rule intitalises itself.



13
14
15
# File 'lib/Rule.rb', line 13

def initialize()
  @values = nil
end

Instance Method Details

#load(value) ⇒ Object

Each rule loads up an array of values.



18
19
20
# File 'lib/Rule.rb', line 18

def load(value)
  @values << value
end

#trainObject

Each rule trains on values to determine its patterns.



23
24
25
# File 'lib/Rule.rb', line 23

def train()

end

#validateObject

Each rule compares the data it has with the data it’s given.



28
29
30
# File 'lib/Rule.rb', line 28

def validate()

end