Class: Css2Stylus::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/css2stylus.rb

Instance Method Summary collapse

Constructor Details

#initialize(css = nil) ⇒ Converter

Returns a new instance of Converter.



5
6
7
8
9
# File 'lib/css2stylus.rb', line 5

def initialize(css=nil)
  if not css.nil?
    @css = css
  end
end

Instance Method Details

#getObject



22
23
24
# File 'lib/css2stylus.rb', line 22

def get
  return @stylus
end

#processObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/css2stylus.rb', line 11

def process
  @stylus = ''
  if @css.nil? || @css.empty?
    return @stylus
  end
  @tree = {}
  generate_tree
  render
  return true
end