Skip to content

Instantly share code, notes, and snippets.

@yaychris
yaychris / tlc.lua
Created March 28, 2012 16:39 — forked from fjolnir/tlc.lua
LuaJIT ObjC bridge
-- TLC - The Tiny Lua Cocoa bridge
-- Note: Only tested with LuaJit 2 Beta 9 on x86_64 with OS X >=10.7.3 & iPhone 4 with iOS 5
-- Copyright (c) 2012, Fjölnir Ásgeirsson
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
config = SimpleConfig.new
config.load_file File.join(File.dirname(__FILE__), "sample.rb")
config.get(:foo) #=> "bar"
config[:save_path] #=> "/var/www/download"