Skip to content

Commit

Permalink
css arg in constructor can be nil
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspierson committed Mar 13, 2012
1 parent b750cf6 commit e25a97c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions css2less.rb
Expand Up @@ -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
Expand Down

0 comments on commit e25a97c

Please sign in to comment.