lib/eco/cli/config/use_cases.rb in eco-helpers-3.0.4 vs lib/eco/cli/config/use_cases.rb in eco-helpers-3.0.5

- old
+ new

@@ -26,17 +26,20 @@ end # @return [String] summary of the use cases. def help(refine: nil) refinement = refine.is_a?(String)? " (containing: '#{refine}')" : "" + ["The following are the available use cases#{refinement}:"].then do |lines| max_len = keys_max_len(@linked_cases.keys) + @linked_cases.keys.sort.select do |key| !refine.is_a?(String) || key.include?(refine) end.each do |option_case| lines << help_line(option_case, @linked_cases[option_case].description, max_len) end + lines end.join("\n") end # The linked cases @@ -148,9 +151,10 @@ end end def validate_io!(io) return if io.is_a?(Eco::API::UseCases::BaseIO) + raise ArgumentError, "You need to provide Eco::API::UseCases::BaseIO object. Given: #{io.class}" end end end end