lib/sugar-high/module.rb in sugar-high-0.6.3 vs lib/sugar-high/module.rb in sugar-high-0.7.0
- old
+ new
@@ -11,18 +11,18 @@
module_names.flatten.each do |name|
class_eval %{
module #{name.to_s.camelize}
#{yield block if block}
end
- }
+ }
end
-end
+end
def nested_modules *module_names, &block
- module_names.flatten.inject([]) do |res, name|
+ module_names.flatten.inject([]) do |res, name|
res << %{
module #{name.to_s.camelize}
#{yield block if block}
- end}
+ end}
end.flatten.join("\n")
end