lib/convenient_service/examples/standard/gemfile/services/format.rb in convenient_service-0.13.0 vs lib/convenient_service/examples/standard/gemfile/services/format.rb in convenient_service-0.14.0

- old
+ new

@@ -1,12 +1,12 @@ # frozen_string_literal: true ## # Usage example: # -# result = ConvenientService::Examples::Standard::Gemfile::Services::Format.result(path: "Gemfile") -# result = ConvenientService::Examples::Standard::Gemfile::Services::Format.result(path: "spec/cli/gemfile/format/fixtures/Gemfile") +# result = ConvenientService::Examples::Standard::Gemfile::Services::Format.result(path: "Gemfile") +# result = ConvenientService::Examples::Standard::Gemfile::Services::Format.result(path: "spec/cli/gemfile/format/fixtures/Gemfile") # module ConvenientService module Examples module Standard class Gemfile @@ -65,11 +65,11 @@ end private def validate_path - return failure(path: "Path is `nil`") if path.nil? - return failure(path: "Path is empty") if path.empty? + return error("Path is `nil`") if path.nil? + return error("Path is empty") if path.empty? success end end end