Sha256: c1f7ffe0e9a9b2d982ca36a764a1e5dde29b1eac35a437c8e46b3e1a3294af02

Contents?: true

Size: 561 Bytes

Versions: 1

Compression:

Stored size: 561 Bytes

Contents

# These are all the functions needed for Cuby
# Pretty cool eh?
# Jon Vlachoyiannis (jon@emotionull.com)
# (16/10/2009)
    
def include(filename)
  require filename
end

def main(&block)
  instance_eval(&block)
end

def method_missing(meth, *args, &block)
  self.class.send(:define_method, meth, *args, &block)
end

def preformat_data(data)
  data.gsub(/^\s*\/\//,'#').gsub(/^(\s*)([a-zA-Z_]{1}[a-zA-Z0-9_]*)\s+(.+?)\s*\{/, "\\1\\2 { |\\3|")
end

#FIXME Interactive mode does not work with loop defined
# def loop(start, cond, action, &block)
#   return
# end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cuby-0.1.5 lib/cuby/vm.rb