Sha256: f8ef60bacd9e1245667b06e23e7feeb459fc9334c4e0c9f79617e5a29f0c5e03

Contents?: true

Size: 444 Bytes

Versions: 4

Compression:

Stored size: 444 Bytes

Contents

module GirFFI
  module Overrides
    module Gtk

      def self.included(base)
	base._setup_method "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

4 entries across 4 versions & 1 rubygems

Version Path
gir_ffi-0.0.14 lib/gir_ffi/overrides/gtk.rb
gir_ffi-0.0.13 lib/gir_ffi/overrides/gtk.rb
gir_ffi-0.0.12 lib/gir_ffi/overrides/gtk.rb
gir_ffi-0.0.11 lib/gir_ffi/overrides/gtk.rb