Class: Biz::Validation

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

Defined Under Namespace

Classes: Rule

Class Method Summary collapse

Instance Method Summary collapse

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

#performObject



14
15
16
17
18
# File 'lib/biz/validation.rb', line 14

def perform
  RULES.each do |rule| rule.check(raw) end

  self
end