Module: Melomel
- Defined in:
- lib/melomel.rb,
lib/melomel/date.rb,
lib/melomel/flex.rb,
lib/melomel/error.rb,
lib/melomel/bridge.rb,
lib/melomel/version.rb,
lib/melomel/cucumber.rb,
lib/melomel/bridge/ui.rb,
lib/melomel/object_proxy.rb,
lib/melomel/bridge/messaging.rb
Overview
These add-on methods enable the message encoding and decoding.
Defined Under Namespace
Classes: Bridge, Cucumber, Date, Error, Flex, MelomelError, ObjectProxy, UnrecognizedTypeError
Constant Summary collapse
- VERSION =
"0.6.6"
Class Attribute Summary collapse
-
.bridge ⇒ Object
readonly
Returns the value of attribute bridge.
Class Method Summary collapse
-
.connect(host = '127.0.0.1', port = 10101) ⇒ Object
Opens a bridge connection to the SWF file.
-
.create_object(class_name) ⇒ Object
Creates an object in the virtual machine.
-
.get_class(*args) ⇒ Object
Retrieves a reference to a class.
-
.invoke_function(function, *args) ⇒ Object
Invokes package level function.
- .method_missing(method, *args) ⇒ Object
Class Attribute Details
.bridge ⇒ Object (readonly)
Returns the value of attribute bridge.
20 21 22 |
# File 'lib/melomel.rb', line 20 def bridge @bridge end |
Class Method Details
.connect(host = '127.0.0.1', port = 10101) ⇒ Object
Opens a bridge connection to the SWF file. This is a blocking call and will wait until a SWF connects before continuing.
24 25 26 27 |
# File 'lib/melomel.rb', line 24 def connect(host='127.0.0.1', port=10101) @bridge = Melomel::Bridge.new(host, port) @bridge.connect(); end |
.create_object(class_name) ⇒ Object
Creates an object in the virtual machine.
39 40 41 |
# File 'lib/melomel.rb', line 39 def create_object(class_name) @bridge.create_object(class_name) end |
.get_class(*args) ⇒ Object
Retrieves a reference to a class
34 35 36 |
# File 'lib/melomel.rb', line 34 def get_class(*args) @bridge.get_class(*args) end |
.invoke_function(function, *args) ⇒ Object
Invokes package level function
44 45 46 |
# File 'lib/melomel.rb', line 44 def invoke_function(function, *args) @bridge.invoke_function(function, *args) end |
.method_missing(method, *args) ⇒ Object
29 30 31 |
# File 'lib/melomel.rb', line 29 def method_missing(method, *args) @bridge.__send__(method.to_sym, *args) end |