Module: GObject::RubyStyle
- Included in:
- Object
- Defined in:
- lib/ffi-gobject/ruby_style.rb
Instance Method Summary collapse
-
#method_missing(method, *args) ⇒ Object
TODO: Generate accessor methods from GIR at class definition time.
-
#signal_connect(event, &block) ⇒ Object
TODO: Move to definition of GObject::Object.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
TODO: Generate accessor methods from GIR at class definition time
6 7 8 9 10 11 12 13 14 |
# File 'lib/ffi-gobject/ruby_style.rb', line 6 def method_missing(method, *args) if respond_to?("get_#{method}") return send("get_#{method}", *args) end if method.to_s =~ /(.*)=$/ && respond_to?("set_#{$1}") return send("set_#{$1}", *args) end super end |
Instance Method Details
#signal_connect(event, &block) ⇒ Object
TODO: Move to definition of GObject::Object
17 18 19 |
# File 'lib/ffi-gobject/ruby_style.rb', line 17 def signal_connect(event, &block) GObject.signal_connect(self, event, &block) end |