Class: Gap::DLL

Inherits:
Object
  • Object
show all
Defined in:
lib/gap50/gap/dll.rb

Instance Method Summary collapse

Constructor Details

#initialize(filename, sam = Gap::Main, &block) ⇒ DLL

Returns a new instance of DLL.



26
27
28
29
30
# File 'lib/gap50/gap/dll.rb', line 26

def initialize(filename, sam = Gap::Main, &block)
    @sam      = sam
    @filename = filename
    @realpath = @sam.genfile(@filename, &block).tr("/", "\\")
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args) ⇒ Object



36
37
38
# File 'lib/gap50/gap/dll.rb', line 36

def method_missing(sym, *args)
    self[sym.to_s].call(*args)
end

Instance Method Details

#[](name) ⇒ Object



32
33
34
# File 'lib/gap50/gap/dll.rb', line 32

def [](name)
    DLLFunction.new @realpath, name
end