Class: TestDataTypes
Overview
Data type test service. Run the TestDataTypes.fla to run through all these tests using SWX RPC.
Instance Method Summary collapse
-
#test_array ⇒ Object
Returns the array [‘It’, ‘works’].
-
#test_associative_array ⇒ Object
Returns the associative array [‘it’ => ‘works’, ‘number’ => 42].
-
#test_false ⇒ Object
Returns the boolean false.
-
#test_float ⇒ Object
Returns the float 42.12345.
-
#test_integer ⇒ Object
Returns the integer 42.
-
#test_nested_array ⇒ Object
Returns the nested array [‘It’, [‘also’], ‘works].
-
#test_null ⇒ Object
Returns null.
-
#test_object ⇒ Object
Returns an instance of the TestTO class with properties prop1: “A string” and prop2: 42.
-
#test_string ⇒ Object
Returns the string “It works!”.
-
#test_true ⇒ Object
Returns the boolean true.
Instance Method Details
#test_array ⇒ Object
Returns the array [‘It’, ‘works’]
35 36 37 |
# File 'lib/swxruby/services/test_data_types.rb', line 35 def test_array %w(It works) end |
#test_associative_array ⇒ Object
Returns the associative array [‘it’ => ‘works’, ‘number’ => 42]
75 76 77 |
# File 'lib/swxruby/services/test_data_types.rb', line 75 def test_associative_array {'it' => 'works', 'number' => 42} end |
#test_false ⇒ Object
Returns the boolean false.
27 28 29 |
# File 'lib/swxruby/services/test_data_types.rb', line 27 def test_false false end |
#test_float ⇒ Object
Returns the float 42.12345.
59 60 61 |
# File 'lib/swxruby/services/test_data_types.rb', line 59 def test_float 42.12345 end |
#test_integer ⇒ Object
Returns the integer 42.
51 52 53 |
# File 'lib/swxruby/services/test_data_types.rb', line 51 def test_integer 42 end |
#test_nested_array ⇒ Object
Returns the nested array [‘It’, [‘also’], ‘works]
43 44 45 |
# File 'lib/swxruby/services/test_data_types.rb', line 43 def test_nested_array ['It', ['also'], 'works'] end |
#test_null ⇒ Object
Returns null.
91 92 93 |
# File 'lib/swxruby/services/test_data_types.rb', line 91 def test_null nil end |
#test_object ⇒ Object
Returns an instance of the TestTO class with properties prop1: “A string” and prop2: 42.
83 84 85 |
# File 'lib/swxruby/services/test_data_types.rb', line 83 def test_object TestTO.new end |
#test_string ⇒ Object
Returns the string “It works!”
67 68 69 |
# File 'lib/swxruby/services/test_data_types.rb', line 67 def test_string "It works!" end |
#test_true ⇒ Object
Returns the boolean true.
19 20 21 |
# File 'lib/swxruby/services/test_data_types.rb', line 19 def test_true true end |