Sha256: 56f8ef3b92fcfed019ac381e56ceabdfe7e75c72011b4e7a68a73525d50dd72d

Contents?: true

Size: 1016 Bytes

Versions: 5

Compression:

Stored size: 1016 Bytes

Contents

require_relative 'version'
require_relative 'extension'

module WinGui

#  require "bundler"
#  Bundler.setup

  # Requires ruby source file(s). Accepts either single filename/glob or Array of filenames/globs.
  # Accepts following options:
  # :*file*:: Lib(s) required relative to this file - defaults to __FILE__
  # :*dir*:: Required lib(s) located under this dir name - defaults to gem name
  #
  def self.require_libs( libs, opts={} )
    file = Pathname.new(opts[:file] || __FILE__)
    [libs].flatten.each do |lib|
      name = file.dirname + (opts[:dir] || file.basename('.*')) + lib.gsub(/(?<!.rb)$/, '.rb')
      Pathname.glob(name.to_s).sort.each {|rb| require rb}
    end
  end

  module Errors                             # :nodoc:
    class InitError < RuntimeError          # :nodoc:
    end
  end
end  # module WinGui

# Require all ruby source files located under directory lib/win_gui
# If you need files in specific order, you should specify it here before the glob
WinGui.require_libs %W[**/*]

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
win_gui-0.2.16 lib/win_gui.rb
win_gui-0.2.15 lib/win_gui.rb
win_gui-0.2.14 lib/win_gui.rb
win_gui-0.2.13 lib/win_gui.rb
win_gui-0.2.12 lib/win_gui.rb