Class: VirtualBox::COM::XPCOMC::Spec::Property

Inherits:
VirtualBox::COM::XPCOMC::Spec show all
Defined in:
lib/virtualbox/com/xpcomc-ffi/spec.rb

Instance Attribute Summary collapse

Attributes inherited from VirtualBox::COM::XPCOMC::Spec

#name

Instance Method Summary collapse

Methods inherited from VirtualBox::COM::XPCOMC::Spec

#hide?

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

#getterObject (readonly)

Returns the value of attribute getter.



32
33
34
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 32

def getter
  @getter
end

#setterObject (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

Returns:

  • (Boolean)


45
46
47
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 45

def readonly?
    @opts[:readonly]
end

#signaturesObject



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

#to_readObject



51
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 51

def to_read	; Sig.new([[:out, @type]]) 	; end

#to_writeObject



52
# File 'lib/virtualbox/com/xpcomc-ffi/spec.rb', line 52

def to_write	; Sig.new([ @type ]) 		; end