1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- def detect_labels path_to_image_file
15+ # TODO: update to use named parameters
16+
17+ def detect_labels path_to_image_file :
1618# [START detect_labels]
1719 # [START importing_libraries]
1820 require "google/cloud"
@@ -38,7 +40,7 @@ def detect_labels path_to_image_file
3840# [END detect_labels]
3941end
4042
41- def detect_landmark path_to_image_file
43+ def detect_landmark path_to_image_file :
4244# [START detect_landmark]
4345 # [START importing_libraries]
4446 require "google/cloud"
@@ -61,7 +63,7 @@ def detect_landmark path_to_image_file
6163# [END detect_landmarks]
6264end
6365
64- def detect_faces path_to_image_file , path_to_output_file
66+ def detect_faces path_to_image_file : , path_to_output_file :
6567# [START detect_faces]
6668 # [START importing_libraries]
6769 require "google/cloud"
@@ -115,11 +117,12 @@ def detect_faces path_to_image_file, path_to_output_file
115117
116118 case command
117119 when "labels"
118- detect_labels ARGV . shift
120+ detect_labels path_to_image_file : ARGV . shift
119121 when "landmarks"
120- detect_landmark ARGV . shift
122+ detect_landmark path_to_image_file : ARGV . shift
121123 when "faces"
122- detect_faces ARGV . shift , ARGV . shift
124+ detect_faces path_to_image_file : ARGV . shift ,
125+ path_to_output_file : ARGV . shift
123126 else
124127 puts <<-usage
125128Usage: ruby vision_samples.rb <command> [arguments]
0 commit comments