Method: CrystalRuby::Library#initialize

Defined in:
lib/crystalruby/library.rb

#initialize(name) ⇒ Library

A Library represents a single Crystal shared object. It holds code as either methods (invokable from Ruby and attached) or anonymous chunks, which are just raw Crystal code.



32
33
34
35
36
37
38
39
# File 'lib/crystalruby/library.rb', line 32

def initialize(name)
  self.name = name
  self.methods = {}
  self.exposed_methods = {}
  self.chunks = []
  self.shards = {}
  initialize_library!
end