Class: Verifier::Verification Private
- Inherits:
-
Object
- Object
- Verifier::Verification
- Defined in:
- lib/verifier/verification.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Verification runner
Class Method Summary collapse
-
.run(object, variable, name, &block) ⇒ undefined
private
Constructs and runs a verification object.
Instance Method Summary collapse
-
#initialize(object, variable, name, &block) ⇒ undefined
constructor
private
Initializes a verification object.
-
#run { ... } ⇒ undefined
private
Runs a verification.
Constructor Details
#initialize(object, variable, name, &block) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initializes a verification object
21 22 23 24 |
# File 'lib/verifier/verification.rb', line 21 def initialize(object, variable, name, &block) fail SyntaxError.new "No block given" unless block_given? @object, @variable, @name, @block = object, variable, name, block end |
Class Method Details
.run(object, variable, name, &block) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Constructs and runs a verification object
50 51 52 |
# File 'lib/verifier/verification.rb', line 50 def self.run(object, variable, name, &block) send(:new, object, variable, name, &block).run end |
Instance Method Details
#run { ... } ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Runs a verification
38 39 40 41 |
# File 'lib/verifier/verification.rb', line 38 def run check_method_existence check_condition end |