Class: Mutations::Command
- Inherits:
-
Object
- Object
- Mutations::Command
- Defined in:
- lib/mutations_validate_outcome.rb
Direct Known Subclasses
Class Method Summary collapse
Class Method Details
.input_descriptions ⇒ Object
78 79 80 |
# File 'lib/mutations_validate_outcome.rb', line 78 def input_descriptions input_filters.input_descriptions if input_filters.respond_to?(:input_descriptions) end |
.yo!(*args) ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mutations_validate_outcome.rb', line 82 def yo! *args result = run!(*args) case name # name of the class when ->(_) { !const_defined?('Hashie::Mash') } then result when /Hash\z/ then ::Hashie::Mash.new(result) when /Array\z/ then result.map { |h| ::Hashie::Mash.new(h) } else result end rescue => e yve = YoValidationException.new(e, self) # we’ll re-raise either if no block was given, or if the block returned truthy raise yve if !block_given? || (yield yve) end |