Class: VimSdk::Property
- Inherits:
-
Object
- Object
- VimSdk::Property
- Defined in:
- lib/ruby_vim_sdk/property.rb
Instance Attribute Summary collapse
-
#expected_type ⇒ Object
Returns the value of attribute expected_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#privilege ⇒ Object
Returns the value of attribute privilege.
-
#type ⇒ Object
Returns the value of attribute 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, type, version, flags = {}, privilege = nil) ⇒ Property
constructor
A new instance of Property.
- #link? ⇒ Boolean
- #linkable? ⇒ Boolean
- #optional? ⇒ Boolean
Constructor Details
#initialize(name, type, version, flags = {}, privilege = nil) ⇒ Property
Returns a new instance of Property.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ruby_vim_sdk/property.rb', line 11 def initialize(name, type, version, flags = {}, privilege = nil) @name = VmodlHelper.vmodl_property_to_ruby(name) @type = type.kind_of?(Class) ? type : VmodlHelper.vmodl_type_to_ruby(type) @wsdl_name = name @version = version @privilege = privilege @expected_type = nil @optional = false @link = false @linkable = false flags.each do |key, value| case key when :optional @optional = value when :link @link = value when :linkable @linkable = value else raise "Unknown flag: #{key}" end end end |
Instance Attribute Details
#expected_type ⇒ Object
Returns the value of attribute expected_type.
9 10 11 |
# File 'lib/ruby_vim_sdk/property.rb', line 9 def expected_type @expected_type end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/ruby_vim_sdk/property.rb', line 4 def name @name end |
#privilege ⇒ Object
Returns the value of attribute privilege.
8 9 10 |
# File 'lib/ruby_vim_sdk/property.rb', line 8 def privilege @privilege end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/ruby_vim_sdk/property.rb', line 5 def type @type end |
#version ⇒ Object
Returns the value of attribute version.
7 8 9 |
# File 'lib/ruby_vim_sdk/property.rb', line 7 def version @version end |
#wsdl_name ⇒ Object
Returns the value of attribute wsdl_name.
6 7 8 |
# File 'lib/ruby_vim_sdk/property.rb', line 6 def wsdl_name @wsdl_name end |
Instance Method Details
#link? ⇒ Boolean
40 41 42 |
# File 'lib/ruby_vim_sdk/property.rb', line 40 def link? @link end |
#linkable? ⇒ Boolean
44 45 46 |
# File 'lib/ruby_vim_sdk/property.rb', line 44 def linkable? @linkable end |
#optional? ⇒ Boolean
36 37 38 |
# File 'lib/ruby_vim_sdk/property.rb', line 36 def optional? @optional end |