Permalink
Browse files

css arg in constructor can be nil

  • Loading branch information...
1 parent b750cf6 commit e25a97ca6bc57babfffaefd973c986829f7cd3ae @thomaspierson committed Mar 13, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 css2less.rb
View
@@ -5,19 +5,22 @@ module Css2Less
class Converter
- def initialize(css)
- @css = css
+ def initialize(css=nil)
+ if not css.nil?
+ @css = css
+ end
@tree = {}
@less = ''
end
def process_less
- if @css.empty?
+ if @css.nil?
return false
end
cleanup
generate_tree
render_less
+ return true
end
def get_less

0 comments on commit e25a97c

Please sign in to comment.