Class: Rulix::Validators::StringValidator
- Inherits:
-
Object
- Object
- Rulix::Validators::StringValidator
- Defined in:
- lib/rulix/validators/string_validator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.to_proc ⇒ Object
4 5 6 |
# File 'lib/rulix/validators/string_validator.rb', line 4 def self.to_proc new.method(:call) end |
Instance Method Details
#call(value) ⇒ Object
8 9 10 11 12 |
# File 'lib/rulix/validators/string_validator.rb', line 8 def call value return [false, ] unless value String === value || [false, ] end |
#error_message ⇒ Object
14 15 16 |
# File 'lib/rulix/validators/string_validator.rb', line 14 def "is not a string" end |