• Marek Vavruša's avatar
    daemon/engine: syntactic sugar for module ‘get’, ‘set’ properties · ae7b572d
    Marek Vavruša authored
    if the module declares such properties, they can be accessed
    by treating module as a table, e.g.
    
    hints[‘localhost’] = ‘127.0.0.1’
    hints.hostname = ‘192.168.1.1.
    print(hints.localhost)
    
    equals to:
    hints.set(‘localhost 127.0.0.1’)
    hints.set(‘hostname 192.168.1.1’)
    print(hints.get(‘localhost’))
    ae7b572d
sandbox.lua 2.64 KB