Sha256: 9923ca8306916866603f70f0bf3bbbff49c641b4383295b36b3cb5aa5bcbf53b

Contents?: true

Size: 461 Bytes

Versions: 6

Compression:

Stored size: 461 Bytes

Contents

module GirFFI
  module Overrides
    module Gtk

      def self.included(base)
	base.gir_ffi_builder.setup_function "init"
	base.extend ClassMethods
	base.class_eval do

	  class << self
	    alias init_without_auto_argv init
	    alias init init_with_auto_argv
	  end

	end
      end

      module ClassMethods

	def init_with_auto_argv
	  my_args = init_without_auto_argv [$0, *ARGV]
	  my_args.shift
	  ARGV.replace my_args
	end

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gir_ffi-0.0.10 lib/gir_ffi/overrides/gtk.rb
gir_ffi-0.0.9 lib/gir_ffi/overrides/gtk.rb
gir_ffi-0.0.8 lib/gir_ffi/overrides/gtk.rb
gir_ffi-0.0.7 lib/gir_ffi/overrides/gtk.rb
gir_ffi-0.0.6 lib/gir_ffi/overrides/gtk.rb
gir_ffi-0.0.5 lib/gir_ffi/overrides/gtk.rb