Class: Apipie::Validator::UndefValidator

Inherits:
BaseValidator show all
Defined in:
lib/apipie/validator.rb

Overview

special type of validator: we say that it’s not specified

Instance Attribute Summary

Attributes inherited from BaseValidator

#param_description

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseValidator

#error, #expected_type, find, inherited, #initialize, #merge_with, #param_name, #params_ordered, #to_json, #to_s, #valid?

Constructor Details

This class inherits a constructor from Apipie::Validator::BaseValidator

Class Method Details

.build(param_description, argument, options, block) ⇒ Object



367
368
369
370
371
# File 'lib/apipie/validator.rb', line 367

def self.build(param_description, argument, options, block)
  if argument == :undef
    self.new(param_description)
  end
end

Instance Method Details

#descriptionObject



373
374
375
# File 'lib/apipie/validator.rb', line 373

def description
  nil
end

#validate(value) ⇒ Object



363
364
365
# File 'lib/apipie/validator.rb', line 363

def validate(value)
  true
end