Class: VirtualBox::COM::XPCOMC::Spec::Property
- Inherits:
-
VirtualBox::COM::XPCOMC::Spec
- Object
- VirtualBox::COM::XPCOMC::Spec
- VirtualBox::COM::XPCOMC::Spec::Property
- Defined in:
- lib/virtualbox/com/xpcomc-ffi/spec.rb
Instance Attribute Summary collapse
-
#getter ⇒ Object
readonly
Returns the value of attribute getter.
-
#setter ⇒ Object
readonly
Returns the value of attribute setter.
Attributes inherited from VirtualBox::COM::XPCOMC::Spec
Instance Method Summary collapse
-
#initialize(name, type, opts) ⇒ Property
constructor
A new instance of Property.
- #readonly? ⇒ Boolean
- #signatures ⇒ Object
- #to_read ⇒ Object
- #to_write ⇒ Object
Methods inherited from VirtualBox::COM::XPCOMC::Spec
Constructor Details
#initialize(name, type, opts) ⇒ Property
Returns a new instance of Property.
34 35 36 |
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 34 def initialize(name, type, opts) @name, @type, @opts = name, type, opts end |
Instance Attribute Details
#getter ⇒ Object (readonly)
Returns the value of attribute getter.
32 33 34 |
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 32 def getter @getter end |
#setter ⇒ Object (readonly)
Returns the value of attribute setter.
32 33 34 |
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 32 def setter @setter end |
Instance Method Details
#readonly? ⇒ Boolean
45 46 47 |
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 45 def readonly? @opts[:readonly] end |
#signatures ⇒ Object
38 39 40 41 42 43 |
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 38 def signatures r = {} r[getter] = to_read r[setter] = to_write unless self.readonly? r end |