testability-driver-qt-sut-plugin 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/env.rb +26 -0
- data/installer/extconf.rb +62 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin.rb +23 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/action.rb +156 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/application.rb +318 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/attribute.rb +227 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/behaviour.rb +140 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/configure_behaviour.rb +317 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/events.rb +165 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/file_transfer.rb +333 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/find.rb +80 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/fixture.rb +178 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/gesture.rb +906 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/infologger.rb +604 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/key_press.rb +152 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/locale_db.rb +151 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/method.rb +85 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/multitouch.rb +455 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/os.rb +100 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/qt_api_method.rb +148 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/record.rb +124 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/screen_capture.rb +283 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/sut.rb +492 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/synchronization.rb +113 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/treewidgetitemcolumn.rb +93 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/type_text.rb +97 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/view_item.rb +97 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/webkit.rb +230 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/widget.rb +663 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/action.rb +30 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/configure_command.rb +38 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/drag.rb +44 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/find_object.rb +50 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/fixture.rb +45 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/group.rb +48 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/infologger_command.rb +38 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/qt.rb +170 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/tap.rb +54 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/widget.rb +226 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/application.rb +264 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/configure_command.rb +60 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/find_object.rb +114 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/fixture.rb +67 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/group.rb +52 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/infologger_command.rb +62 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/key_sequence.rb +99 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/screen_capture.rb +54 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/tap.rb +51 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/controllers/widget.rb +72 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/plugin.rb +119 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/adapter.rb +225 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/communication.rb +154 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/sut/controller.rb +58 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/fixture_parameter.rb +77 -0
- data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/widget.rb +82 -0
- data/lib/testability-driver-qt-sut-plugin.rb +24 -0
- data/xml/behaviour/qt.xml +717 -0
- data/xml/defaults/sut_qt.xml +9 -0
- data/xml/keymap/qt.xml +321 -0
- data/xml/template/qt.xml +124 -0
- metadata +141 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
require File.expand_path( File.join( File.dirname( __FILE__ ), 'widget.rb' ) )
|
23
|
+
|
24
|
+
module MobyCommand
|
25
|
+
|
26
|
+
class Action < MobyCommand::WidgetCommand
|
27
|
+
|
28
|
+
end #class
|
29
|
+
|
30
|
+
end #module
|
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/configure_command.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
module MobyCommand
|
23
|
+
|
24
|
+
class ConfigureCommand < MobyCommand::CommandData
|
25
|
+
|
26
|
+
attr_accessor :name, :params, :value, :application_id
|
27
|
+
|
28
|
+
def initialize(name = nil, parameter_hash = {}, value = "")
|
29
|
+
|
30
|
+
@name = name
|
31
|
+
@params = parameter_hash
|
32
|
+
@value = value
|
33
|
+
@application_id = ""
|
34
|
+
end
|
35
|
+
|
36
|
+
end # ConfigureCommand
|
37
|
+
|
38
|
+
end # MobyCommand
|
@@ -0,0 +1,44 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
module MobyCommand
|
23
|
+
|
24
|
+
class Drag < MobyCommand::CommandData
|
25
|
+
|
26
|
+
#attr_writer :xcoordinate, :_ycoordinate
|
27
|
+
|
28
|
+
# Constructor to Tap
|
29
|
+
# == params
|
30
|
+
# text:: (optional) String to be added to text sequence if given.
|
31
|
+
# == returns
|
32
|
+
# Instance of TypeText
|
33
|
+
def initialize( start_x = nil, start_y = nil, end_x = nil, end_y = nil, duration = 1 )
|
34
|
+
# Set status value to nil (not executed)
|
35
|
+
@_start_x = start_x
|
36
|
+
@_start_y = start_y
|
37
|
+
@_end_x = end_x
|
38
|
+
@_end_y = end_y
|
39
|
+
@_duration = duration
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
end #module
|
@@ -0,0 +1,50 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
module MobyCommand
|
21
|
+
|
22
|
+
|
23
|
+
class FindObjectCommand < MobyCommand::CommandData
|
24
|
+
|
25
|
+
|
26
|
+
# Constructor
|
27
|
+
# == params
|
28
|
+
# btn_id:: (optional) String, id for the button perform this command on
|
29
|
+
# command_type:: (optional) Symbol, defines the command to perform on the button
|
30
|
+
# == returns
|
31
|
+
# Touch:: New CommandData object
|
32
|
+
# == raises
|
33
|
+
# ArgumentError:: When the supplied command_type is invalid.
|
34
|
+
def initialize(sut, app_details = nil, params = nil)
|
35
|
+
@_params = params
|
36
|
+
@_app_details = app_details
|
37
|
+
@_sut = sut
|
38
|
+
end
|
39
|
+
|
40
|
+
def application_details
|
41
|
+
@_app_details
|
42
|
+
end
|
43
|
+
|
44
|
+
def search_parameters
|
45
|
+
@_params
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
module MobyCommand
|
23
|
+
|
24
|
+
class Fixture < MobyCommand::CommandData
|
25
|
+
|
26
|
+
attr_accessor :application_id, :name, :command, :params, :transitions, :object_id, :object_type, :asynchronous
|
27
|
+
|
28
|
+
def initialize(application_id = "", object_id ="" , object_type = "", name = nil, command_name = nil, parameter_hash = {}, async = false)
|
29
|
+
|
30
|
+
@application_id = application_id
|
31
|
+
|
32
|
+
@name = name
|
33
|
+
@command = command_name
|
34
|
+
@params = parameter_hash
|
35
|
+
|
36
|
+
@transitions = false
|
37
|
+
@object_id = object_id
|
38
|
+
@object_type = object_type
|
39
|
+
@asynchronous = async
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end # Fixture
|
44
|
+
|
45
|
+
end # MobyCommand
|
@@ -0,0 +1,48 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
#require File.expand_path( File.join( File.dirname( __FILE__ ), 'command_data' ) )
|
23
|
+
|
24
|
+
module MobyCommand
|
25
|
+
|
26
|
+
class Group < MobyCommand::CommandData
|
27
|
+
|
28
|
+
attr_reader :interval, :application, :block, :multitouch
|
29
|
+
|
30
|
+
# Constructor to Group
|
31
|
+
# == params
|
32
|
+
# interval: interval between commands
|
33
|
+
# application: target application
|
34
|
+
# block: block of commands to group
|
35
|
+
def initialize( interval, application, block )
|
36
|
+
@interval = interval
|
37
|
+
@application = application
|
38
|
+
@block = block
|
39
|
+
@multitouch = false
|
40
|
+
end
|
41
|
+
|
42
|
+
def set_multitouch(multitouch = true)
|
43
|
+
@multitouch = multitouch
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
end #module
|
data/lib/testability-driver-plugins/testability-driver-qt-sut-plugin/commands/infologger_command.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
module MobyCommand
|
23
|
+
|
24
|
+
class InfoLoggerCommand < MobyCommand::CommandData
|
25
|
+
|
26
|
+
attr_accessor :application_id, :name, :action, :params
|
27
|
+
|
28
|
+
def initialize(name, parameter_hash = {})
|
29
|
+
|
30
|
+
@application_id = ""
|
31
|
+
@name = name
|
32
|
+
@params = parameter_hash
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end # InfoLoggerCommand
|
37
|
+
|
38
|
+
end # MobyCommand
|
@@ -0,0 +1,170 @@
|
|
1
|
+
############################################################################
|
2
|
+
##
|
3
|
+
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
4
|
+
## All rights reserved.
|
5
|
+
## Contact: Nokia Corporation (testabilitydriver@nokia.com)
|
6
|
+
##
|
7
|
+
## This file is part of TDriver.
|
8
|
+
##
|
9
|
+
## If you have questions regarding the use of this file, please contact
|
10
|
+
## Nokia at testabilitydriver@nokia.com .
|
11
|
+
##
|
12
|
+
## This library is free software; you can redistribute it and/or
|
13
|
+
## modify it under the terms of the GNU Lesser General Public
|
14
|
+
## License version 2.1 as published by the Free Software Foundation
|
15
|
+
## and appearing in the file LICENSE.LGPL included in the packaging
|
16
|
+
## of this file.
|
17
|
+
##
|
18
|
+
############################################################################
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
#require File.expand_path( File.join( File.dirname( __FILE__ ), 'command_data' ) )
|
23
|
+
|
24
|
+
module MobyCommand
|
25
|
+
|
26
|
+
|
27
|
+
class QT_Command < MobyCommand::CommandData
|
28
|
+
|
29
|
+
#Application command types
|
30
|
+
#Touch object = :Press
|
31
|
+
#Hold object = :Hold
|
32
|
+
#Release object = :Relase
|
33
|
+
|
34
|
+
attr_accessor :arguments, :method
|
35
|
+
|
36
|
+
# Constructs a new Touch CommandData object
|
37
|
+
# == params
|
38
|
+
# btn_id:: (optional) String, id for the button perform this command on
|
39
|
+
# command_type:: (optional) Symbol, defines the command to perform on the button
|
40
|
+
# == returns
|
41
|
+
# Touch:: New CommandData object
|
42
|
+
# == raises
|
43
|
+
# ArgumentError:: When the supplied command_type is invalid.
|
44
|
+
def initialize(command_type = nil, btn_id = nil)
|
45
|
+
|
46
|
+
@@_valid_commands = [nil, :Press, :Hold, :Release,:Gesture, :Scroll, :Apicommand, :Tap, :Move]
|
47
|
+
@@_valid_directions = [nil, :Up, :Down, :Left,:Right]
|
48
|
+
@@_valid_orientations = [nil,:Vertical, :Horizontal]
|
49
|
+
|
50
|
+
self.command(command_type)
|
51
|
+
self.id(btn_id)
|
52
|
+
self
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
|
57
|
+
# Defines the type of command this Touch CommandData object represents
|
58
|
+
# == params
|
59
|
+
# command_type:: Symbol, defines the command to perform on the application
|
60
|
+
# == returns
|
61
|
+
# Touch:: This CommandData object
|
62
|
+
# == raises
|
63
|
+
# ArgumentError:: When the supplied command_type is invalid.
|
64
|
+
def command(command_type)
|
65
|
+
|
66
|
+
raise ArgumentError.new("Given command type '#{command_type.to_s}' is not valid.") unless @@_valid_commands.include?( command_type )
|
67
|
+
@_command = command_type
|
68
|
+
self
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
# Defines the id this Touch CommandData object is associated with
|
73
|
+
# == params
|
74
|
+
# btn_id:: String, id of button to perform this command on
|
75
|
+
# == returns
|
76
|
+
# Touch:: This CommandData object
|
77
|
+
# == raises
|
78
|
+
# ArgumentError:: When btn_id is not nil, integer or numeric string
|
79
|
+
def id(btn_id)
|
80
|
+
|
81
|
+
raise ArgumentError.new("The given object id must be nil, integer or a String.") unless btn_id == nil || btn_id.kind_of?(Integer) || (btn_id.kind_of?(String))
|
82
|
+
|
83
|
+
@_id = btn_id.to_s
|
84
|
+
self
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
def get_delta
|
89
|
+
@_delta
|
90
|
+
end
|
91
|
+
|
92
|
+
def delta(delta)
|
93
|
+
@_delta = delta
|
94
|
+
end
|
95
|
+
|
96
|
+
def get_orientation
|
97
|
+
@_orientation
|
98
|
+
end
|
99
|
+
|
100
|
+
def orientation(orientation)
|
101
|
+
raise ArgumentError.new("Given orientation type '#{orientation.to_s}' is not valid.") unless @@_valid_orientations.include?(orientation)
|
102
|
+
@_orientation = orientation
|
103
|
+
end
|
104
|
+
|
105
|
+
def distance(distance)
|
106
|
+
@_distance = distance
|
107
|
+
end
|
108
|
+
|
109
|
+
def get_distance
|
110
|
+
@_distance
|
111
|
+
end
|
112
|
+
|
113
|
+
def speed(speed)
|
114
|
+
@_speed = speed
|
115
|
+
end
|
116
|
+
|
117
|
+
def get_speed
|
118
|
+
@_speed
|
119
|
+
end
|
120
|
+
|
121
|
+
def direction(direction)
|
122
|
+
raise ArgumentError.new("Given direction type '#{direction.to_s}' is not valid.") unless @@_valid_directions.include?(direction)
|
123
|
+
@_direction = direction
|
124
|
+
end
|
125
|
+
|
126
|
+
def get_direction
|
127
|
+
@_direction
|
128
|
+
end
|
129
|
+
|
130
|
+
def get_command
|
131
|
+
@_command
|
132
|
+
end
|
133
|
+
|
134
|
+
def object_type(type)
|
135
|
+
@_object_type = type
|
136
|
+
end
|
137
|
+
|
138
|
+
def get_object_type
|
139
|
+
return "" unless @_object_type
|
140
|
+
@_object_type
|
141
|
+
end
|
142
|
+
|
143
|
+
def get_id
|
144
|
+
@_id
|
145
|
+
end
|
146
|
+
|
147
|
+
def set_coordinates(x, y)
|
148
|
+
@_x = x
|
149
|
+
@_y = y
|
150
|
+
end
|
151
|
+
|
152
|
+
def get_x
|
153
|
+
@_x
|
154
|
+
end
|
155
|
+
|
156
|
+
def get_y
|
157
|
+
@_y
|
158
|
+
end
|
159
|
+
|
160
|
+
def tab_count(tab_count)
|
161
|
+
@_tab_count = tab_count
|
162
|
+
end
|
163
|
+
|
164
|
+
def get_tab_count
|
165
|
+
@_tab_count
|
166
|
+
end
|
167
|
+
|
168
|
+
end #class
|
169
|
+
|
170
|
+
end #module
|