Class: OpenC3::PythonProxy
- Defined in:
- lib/openc3/utilities/python_proxy.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #as_json(*args, **kw_args) ⇒ Object
- #class ⇒ Object
-
#initialize(type, class_name, *params) ⇒ PythonProxy
constructor
A new instance of PythonProxy.
Constructor Details
#initialize(type, class_name, *params) ⇒ PythonProxy
Returns a new instance of PythonProxy.
27 28 29 30 31 32 33 |
# File 'lib/openc3/utilities/python_proxy.rb', line 27 def initialize(type, class_name, *params) @type = type @class_name = class_name @params = params @args = params @name = nil end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
25 26 27 |
# File 'lib/openc3/utilities/python_proxy.rb', line 25 def args @args end |
#name ⇒ Object
Returns the value of attribute name.
24 25 26 |
# File 'lib/openc3/utilities/python_proxy.rb', line 24 def name @name end |
Instance Method Details
#as_json(*args, **kw_args) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/openc3/utilities/python_proxy.rb', line 39 def as_json(*args, **kw_args) case @type when "Processor" return { 'name' => @name, 'class' => @class_name, 'params' => @params } when "Conversion" return { 'class' => @class_name, 'params' => @params } when "LimitsResponse" return { "class" => @class_name, 'params' => @params } else raise "Unknown PythonProxy type: #{@type}" end end |
#class ⇒ Object
35 36 37 |
# File 'lib/openc3/utilities/python_proxy.rb', line 35 def class return @class_name end |