Class: VimSdk::Method
- Inherits:
-
Object
- Object
- VimSdk::Method
- Defined in:
- lib/ruby_vim_sdk/method.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#faults ⇒ Object
Returns the value of attribute faults.
-
#name ⇒ Object
Returns the value of attribute name.
-
#privilege ⇒ Object
Returns the value of attribute privilege.
-
#result_type ⇒ Object
Returns the value of attribute result_type.
-
#version ⇒ Object
Returns the value of attribute version.
-
#wsdl_name ⇒ Object
Returns the value of attribute wsdl_name.
Instance Method Summary collapse
-
#initialize(name, wsdl_name, version, arguments, result, privilege, faults) ⇒ Method
constructor
A new instance of Method.
- #result_type_optional? ⇒ Boolean
Constructor Details
#initialize(name, wsdl_name, version, arguments, result, privilege, faults) ⇒ Method
Returns a new instance of Method.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ruby_vim_sdk/method.rb', line 12 def initialize(name, wsdl_name, version, arguments, result, privilege, faults) @name = VmodlHelper.vmodl_property_to_ruby(name) @wsdl_name = wsdl_name @version = version @privilege = privilege @arguments = arguments.collect { |argument| Property.new(*argument) } @result_type = VmodlHelper.vmodl_type_to_ruby(result[1]) @faults = faults.collect { |fault| VmodlHelper.vmodl_type_to_ruby(fault) } if faults @result_type_optional = false result[0].each do |key, value| case key when :optional @result_type_optional = value else raise "Unknown flag: #{key}" end end end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
8 9 10 |
# File 'lib/ruby_vim_sdk/method.rb', line 8 def arguments @arguments end |
#faults ⇒ Object
Returns the value of attribute faults.
10 11 12 |
# File 'lib/ruby_vim_sdk/method.rb', line 10 def faults @faults end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/ruby_vim_sdk/method.rb', line 4 def name @name end |
#privilege ⇒ Object
Returns the value of attribute privilege.
7 8 9 |
# File 'lib/ruby_vim_sdk/method.rb', line 7 def privilege @privilege end |
#result_type ⇒ Object
Returns the value of attribute result_type.
9 10 11 |
# File 'lib/ruby_vim_sdk/method.rb', line 9 def result_type @result_type end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/ruby_vim_sdk/method.rb', line 6 def version @version end |
#wsdl_name ⇒ Object
Returns the value of attribute wsdl_name.
5 6 7 |
# File 'lib/ruby_vim_sdk/method.rb', line 5 def wsdl_name @wsdl_name end |
Instance Method Details
#result_type_optional? ⇒ Boolean
32 33 34 |
# File 'lib/ruby_vim_sdk/method.rb', line 32 def result_type_optional? @result_type_optional end |