class Xcmake::SwiftBuilder

Public Class Methods

new(template_path=nil) click to toggle source
# File lib/xcmake/source_builder/swift_builder.rb, line 9
def initialize(template_path=nil)
  template_path = template_path || File.expand_path("../../../templates/default.swift.erb", __dir__)
  log_error!("Template not found: #{template_path}") unless File.exist?(template_path)
  @template = File.read(template_path)
end

Public Instance Methods

build(params={}) click to toggle source
# File lib/xcmake/source_builder/swift_builder.rb, line 15
def build(params={})
  params = params
  ERB.new(@template, nil, "-").result(binding)
end