Class: Biz::Validation
- Inherits:
-
Object
- Object
- Biz::Validation
- Defined in:
- lib/biz/validation.rb
Defined Under Namespace
Classes: Rule
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(raw) ⇒ Validation
constructor
A new instance of Validation.
- #perform ⇒ Object
Constructor Details
#initialize(raw) ⇒ Validation
Returns a new instance of Validation.
10 11 12 |
# File 'lib/biz/validation.rb', line 10 def initialize(raw) @raw = raw end |
Class Method Details
.perform(raw) ⇒ Object
6 7 8 |
# File 'lib/biz/validation.rb', line 6 def self.perform(raw) new(raw).perform end |
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 |
# File 'lib/biz/validation.rb', line 14 def perform RULES.each do |rule| rule.check(raw) end self end |