Skip to content

QaDeS/lax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lax

Lax is a Ruby preprocessor for enabling a relaxed and more concise syntax: You can omit the keywords do and end. To get Lax to work in your code, you have to require Lax and then load your .rbl code.

Example: test.rb

require 'rubygems'
require 'lax'

require 'rbltest'
# or: load 'rbltest.rbl'

rbltest.rbl

lines = <<END
  one
  two
  three
END

lines.each |line|
  if line.match /t/
    puts line
  else
    puts "-" + line

Executable

Lax also includes an executable which lets you preprocess single .rbl files.

Example:

lax rbltest.rbl

Disclaimer

This project is not meant to propagate pythonic syntax or spark another “indentation as syntax” war. It was born out of pure laziness, as I got tired of searching missing dos and ends in my code. Lax was derived from pyrb.rb at xtargets.com/snippets/posts/show/68.

About

Use a laxer, more concise Ruby syntax.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages