Module: Valligator::Helper
- Defined in:
- lib/valligator_helper.rb
Instance Method Summary collapse
-
#valligate(*testees, names: nil) ⇒ Valligator
(also: #v)
Returns a new Valligator instance.
-
#vh(hash) ⇒ Valligator
Returns a new Valligator instance created from a hash, where hash values are testees and hash keys are their names.
Instance Method Details
#valligate(*testees, names: nil) ⇒ Valligator Also known as: v
Returns a new Valligator instance
10 11 12 |
# File 'lib/valligator_helper.rb', line 10 def valligate(*testees, names: nil) Valligator.new(*testees, names: names) end |
#vh(hash) ⇒ Valligator
Returns a new Valligator instance created from a hash, where hash values are testees and hash keys are their names.
21 22 23 |
# File 'lib/valligator_helper.rb', line 21 def vh(hash) Valligator.new(*hash.values, names: hash.keys) end |