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
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 " def \#{@info.getter_name}\n get_property \"\#{@info.name}\"\n end\n CODE\nend\n" |
#setter_def ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/gir_ffi/builder/property.rb', line 17 def setter_def return " def \#{@info.getter_name}= value\n set_property \"\#{@info.name}\", value\n end\n CODE\nend\n" |