Class: GirFFI::Builder::Property
- Inherits:
-
Object
- Object
- GirFFI::Builder::Property
- Defined in:
- lib/gir_ffi/builder/property.rb
Overview
Creates property getter and setter code for a given IPropertyInfo.
Instance Method Summary collapse
- #getter_def ⇒ Object
-
#initialize(property_info) ⇒ Property
constructor
A new instance of Property.
- #setter_def ⇒ Object
Constructor Details
#initialize(property_info) ⇒ Property
Returns a new instance of Property.
5 6 7 |
# File 'lib/gir_ffi/builder/property.rb', line 5 def initialize property_info @info = property_info end |
Instance Method Details
#getter_def ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/gir_ffi/builder/property.rb', line 9 def getter_def return <<-CODE def #{@info.getter_name} get_property "#{@info.name}" end CODE end |
#setter_def ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/gir_ffi/builder/property.rb', line 17 def setter_def return <<-CODE def #{@info.getter_name}= value set_property "#{@info.name}", value end CODE end |