RAA - ruby_formatter/0.6.1

ruby_formatter / 0.6.1

Short description: Simple Formatter For Ruby Code
Category: Application/Development
Status: stable
Created: 2007-06-08 04:05:03 GMT
Last update: 2007-10-26 01:36:25 GMT
Owner: Stephen Becker IV (Projects of this owner)
Homepage: http://svn.stephenbeckeriv.com/code/ruby_formatter/
Download: http://svn.stephenbeckeriv.com/code/ruby_formatter/
License: Ruby's
Dependency:
None
Description:
ruby [options] filelist

options:
   -s # will change the indent to a space count of # per level
        by default we space with 1 tab per level
   -b # create a backup file
 
examples:
 ruby simple_formatter.rb -s 3 -b /moo/cluck/cow.rb
 runs with the indent of 3 spaces,creates a backup file, and formats moo/cluck/cow.rb

 ruby simple_formatter.rb -s 31  /moo/cluck/cow.rb /beef/lo/mein
.rb
 formats both files with 31 spaces per level. 

Contributions: Andrew Nutter-Upham  

The formatter is now also a class. You can create your own interfaces for it. 

format_me = Formatter.new(options_hash)
ruby_code =<<-RUBY
def moo
p ouch
end
RUBY
puts format_me.format_string(ruby_code)
format_me.format_file('/d/e/f.rb')
Versions: [0.6.1 (2007-10-26)] [0.6.0 (2007-06-25)] [0.5.0 (2007-06-18)]

Edit this project (for project owner)

back to RAA top