Module: Bosh::Cli::Validation
- Included in:
- ReleaseTarball, Stemcell
- Defined in:
- lib/cli/validation.rb
Instance Method Summary collapse
- #errors ⇒ Object
- #reset_validation ⇒ Object
- #valid?(options = {}) ⇒ Boolean
- #validate(options = {}) ⇒ Object
Instance Method Details
#errors ⇒ Object
8 9 10 |
# File 'lib/cli/validation.rb', line 8 def errors @errors ||= [] end |
#reset_validation ⇒ Object
24 25 26 27 |
# File 'lib/cli/validation.rb', line 24 def reset_validation @validated = nil @errors = [] end |
#valid?(options = {}) ⇒ Boolean
12 13 14 15 |
# File 'lib/cli/validation.rb', line 12 def valid?( = {}) validate() unless @validated errors.empty? end |
#validate(options = {}) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/cli/validation.rb', line 17 def validate( = {}) perform_validation() rescue ValidationHalted ensure @validated = true end |