lib/stylegen/generator.rb in stylegen-0.3.1 vs lib/stylegen/generator.rb in stylegen-0.4.0
- old
+ new
@@ -8,18 +8,17 @@
def initialize(data)
@data = Data.new(data)
end
def generate
- template_content = File.read(File.join(__dir__, "resources/template.swift.erb"))
- template = Template.new(template_content, @data)
+ template = Template.new(@data)
file = File.open(@data.output_path, "w")
file << template.render
file.close
end
def stats
- @stats ||= { output_path: @data.output_path, color_count: @data.colors.count }
+ @stats ||= { output_path: @data.output_path, color_count: @data.color_entries.count }
end
end
end