Module: Bashly::Script::Introspection::Validate
- Included in:
- Argument, EnvironmentVariable, Flag
- Defined in:
- lib/bashly/script/introspection/validate.rb
Instance Method Summary collapse
-
#validate ⇒ Object
Returns an array of validations.
-
#validate? ⇒ Boolean
Returns true if there are any validations defined.
Instance Method Details
#validate ⇒ Object
Returns an array of validations
6 7 8 9 10 11 |
# File 'lib/bashly/script/introspection/validate.rb', line 6 def validate return [] unless ['validate'] result = ['validate'] result.is_a?(Array) ? result : [result] end |
#validate? ⇒ Boolean
Returns true if there are any validations defined
14 |
# File 'lib/bashly/script/introspection/validate.rb', line 14 def validate? = validate.any? |