Class: Tm2Gsv::ThemeWriter

Inherits:
Object show all
Defined in:
lib/tm2gsv/theme/writer.rb

Instance Method Summary collapse

Constructor Details

#initialize(task) ⇒ ThemeWriter

Returns a new instance of ThemeWriter.



7
8
9
# File 'lib/tm2gsv/theme/writer.rb', line 7

def initialize(task)
  @task = task || ::Thor.new()
end

Instance Method Details

#write(theme, destination) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/tm2gsv/theme/writer.rb', line 11

def write(theme, destination)
  @theme = theme
  @destination = destination
  @file = File.join(@destination, "#{@theme[:id]}.xml")

  create_doc
  create_scheme

  create_styles(@theme[:settings])
  create_styles(@theme[:styles])

  write_file

  return @file
end