Class: WorkflowTemplate::Adapters::Validation::Generic::Builder

Inherits:
Validation::Adapter::Abstract::Builder show all
Defined in:
lib/workflow_template/adapters/validation/generic/builder.rb

Defined Under Namespace

Classes: Error

Constant Summary

Constants inherited from Validation::Adapter::Abstract::Builder

Validation::Adapter::Abstract::Builder::Error

Instance Method Summary collapse

Methods inherited from Validation::Adapter::Abstract::Builder

#initialize

Constructor Details

This class inherits a constructor from WorkflowTemplate::Validation::Adapter::Abstract::Builder

Instance Method Details

#using(implementation) ⇒ Object



20
21
22
23
# File 'lib/workflow_template/adapters/validation/generic/builder.rb', line 20

def using(implementation)
  validator = Generic::Object.new(implementation)
  proxy.declare(validator)
end

#validate(&block) ⇒ Object



14
15
16
17
18
# File 'lib/workflow_template/adapters/validation/generic/builder.rb', line 14

def validate(&block)
  return self unless block

  proxy.declare(Generic::Block.new(block))
end