lib/util/services.rb
# Compares the name, label, and tags of each service to the given +filter+. The method returns +true+ if the
# +filter+ matches exactly one volume service, +false+ otherwise.
#
# @param [Regexp, String] filter a +RegExp+ or +String+ to match against the name, label, and tags of the services
# @return [Boolean] +true+ if the +filter+ matches exactly one volume service with the required credentials,
#                   +false+ otherwise.
Compares the name, label, and tags of each service to the given +filter+.
Compares the name label and tags of each service to the given + filter + .
def one_volume_service?(filter)
            select(&service?(filter))
              .select(&volume_mount?)
              .one?
          end
def one_volume_service? ( filter ) select ( & service? ( filter ) ) . select ( & volume_mount? ) . one? end
Compares the name, label, and tags of each service to the given +filter+.
Compares the name label and tags of each service to the given + filter + .
+true+ if the +filter+ matches exactly one volume service with the required credentials, +false+ otherwise.
+ true + if the + filter + matches exactly one volume service with the required credentials + false + otherwise .
Boolean
filter
filter a +RegExp+ or +String+ to match against the name, label, and tags of the services
filter a + RegExp + or + String + to match against the name label and tags of the services