toy_robot_cli 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c145bb96e64a3e559084b341f50a38efec5f235b12bf946babe0c2bc2376ab64
4
- data.tar.gz: 39c2783f9367048e8346dd8b45db6d4ae9c340b1062e8694b949493f566b4a8a
3
+ metadata.gz: '0286fcf7a56398a6d3263ec5b8512beefa7aac8c24cbabc1730fa7f8c0ac23e6'
4
+ data.tar.gz: 55ce69fa57731918240127ee733af3861f82cd25416309f86b9a4361e9572b3d
5
5
  SHA512:
6
- metadata.gz: d92addaad468bfdd6375b3b3771c9657eec02ab4297e7c969340273f9ae3c79f44dcef3076bc0f3d4089371e1745bbe5335a134ca51c28daacb79fb2f450e9da
7
- data.tar.gz: c935935c5e16189f8105ba8477ee9d41a2a823dd6a1be4704cc85a56601ba10071ebf7e9285646c846eb24dee8b6b1dd78b2fb85c166fe598b7a4bc2a5bae24f
6
+ metadata.gz: 989ca9cc8029b13045eae164da6f2d1e5cc7b40b5ed59a57fd8de5408c55f46ae326b50a7cda8fda33dfb141a46c1eaf370e3a2c55901b03e4df6886920d4d88
7
+ data.tar.gz: 971511c18d084a0cf59299d1c6d3d146252976fd15773b56938ed6ea22a8f160578153f5dd84eb8fcafef3b08d6a50c164abc0d3169842d72fd6727f6f9b915f
@@ -46,6 +46,16 @@ module ToyRobotCli
46
46
  end
47
47
  end
48
48
 
49
+ desc "current_direction", "Return the current direction of the robot"
50
+ def current_direction
51
+ direction = @robot.current_direction
52
+ if direction
53
+ puts "Current Direction: #{direction}"
54
+ else
55
+ puts "Robot is not placed on the table."
56
+ end
57
+ end
58
+
49
59
  desc "interactive", "Interactive mode to input commands"
50
60
  def interactive
51
61
  loop do
@@ -67,6 +77,8 @@ module ToyRobotCli
67
77
  report
68
78
  when "current_position"
69
79
  current_position
80
+ when "current_direction"
81
+ current_direction
70
82
  when "exit"
71
83
  break
72
84
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ToyRobotCli
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toy_robot_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo H Sacramento
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-20 00:00:00.000000000 Z
11
+ date: 2023-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aruba