Module: IsHashValid::Validators
- Included in:
- Validator
- Defined in:
- lib/is_hash_valid/validators.rb
Instance Method Summary collapse
Instance Method Details
#be_string(value) ⇒ Object
12 13 14 |
# File 'lib/is_hash_valid/validators.rb', line 12 def be_string(value) value.is_a? String end |
#not_empty(value) ⇒ Object
7 8 9 10 |
# File 'lib/is_hash_valid/validators.rb', line 7 def not_empty(value) return false unless value.is_a? String value.empty? ? false : true end |
#required(value) ⇒ Object
3 4 5 |
# File 'lib/is_hash_valid/validators.rb', line 3 def required(value) value ? true : false end |