Permalink
Browse files

add inline class and module support

  • Loading branch information...
brantwedel committed Mar 17, 2014
1 parent d6ea87e commit 162ed522875fff3bc718b46929f1996cb3b0a58f
Showing with 4 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 lib/yaddl.rb
  3. +1 −1 lib/yaddl/version.rb
View
@@ -6,3 +6,4 @@ test/dummy/db/*.sqlite3-journal
test/dummy/log/*.log
test/dummy/tmp/
test/dummy/.sass-cache
/*.gem
View
@@ -496,14 +496,14 @@ def parse_line(line, models, stack, depth)
@multiline ||= false
unless @multiline
if line.strip =~ /^def .*$/ || line.strip =~ / do \|.+\|$/ || line.strip =~ / do$/ || line.strip =~ /^if / || line.strip =~ /^unless /
if line.strip =~ /^(def|module|class|if|unless) / || line.strip =~ / do \|.+\|$/ || line.strip =~ / do$/
@multiline = true
@multiline_spaces = spaces
@multiline_end = /^#{" " * @multiline_spaces}end$/
@multiline_buffer = line[@multiline_spaces..line.length]
return
elsif line.strip =~ /^[a-z_]+ |^acts_as_.*/
if line.strip =~ /"^include |^extend |^acts_as_[a-z_]+/
if line.strip =~ /"^include |^require |^extend |^acts_as_[a-z_]+/
line = "!top{#{line.strip}}"
else
line = "!!{#{line.strip}}"
View
@@ -1,3 +1,3 @@
module Yaddl
VERSION = "0.0.1"
VERSION = "0.0.2"
end

0 comments on commit 162ed52

Please sign in to comment.