Class: MobyUtil::MessageComposer::TasCommands
- Inherits:
-
Object
- Object
- MobyUtil::MessageComposer::TasCommands
- Defined in:
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb
Instance Method Summary collapse
-
#command(*arguments) ⇒ Object
TODO: document me.
-
#initialize(options = {}) ⇒ TasCommands
constructor
TODO: document me.
-
#object(*arguments) ⇒ Object
targets.
-
#parameter(*arguments) ⇒ Object
TODO: document me.
-
#target(options = {}) ⇒ Object
TODO: document me.
-
#targets ⇒ Object
TODO: document me.
-
#to_xml ⇒ Object
TODO: document me.
Constructor Details
#initialize(options = {}) ⇒ TasCommands
TODO: document me
27 28 29 30 31 32 33 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb', line 27 def initialize( = {} ) @command_attributes = @targets = [] end |
Instance Method Details
#command(*arguments) ⇒ Object
TODO: document me
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb', line 54 def command( *arguments ) command_hash = { :parameters => [] } while arguments.count > 0 value = arguments.shift if value.kind_of?( Hash ) command_hash[ :arguments ] = value else command_hash[ :value ] = value end end @targets.last[ :commands ] << command_hash end |
#object(*arguments) ⇒ Object
targets
49 50 51 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb', line 49 def object( *arguments ) end |
#parameter(*arguments) ⇒ Object
TODO: document me
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb', line 79 def parameter( *arguments ) params_hash = {} while arguments.count > 0 value = arguments.shift if value.kind_of?( Hash ) params_hash[ :arguments ] = value else params_hash[ :value ] = value end end @targets.last[ :commands ][ :parameters ] << params_hash end |
#target(options = {}) ⇒ Object
TODO: document me
36 37 38 39 40 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb', line 36 def target( = {} ) @targets << { :arguments => , :objects => [], :commands => [] } end |
#targets ⇒ Object
TODO: document me
43 44 45 46 47 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb', line 43 def targets @targets end |
#to_xml ⇒ Object
TODO: document me
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/util/message_composer.rb', line 104 def to_xml targets = targets_to_xml if targets.length > 0 "<TasCommands #{ @command_attributes.to_attributes }>#{ targets }</TasCommands>" else "<TasCommands #{ @command_attributes.to_attributes } />" end end |