class Elm::Compiler

Compile a set of elm files with options

Public Class Methods

new(runnable) click to toggle source
# File lib/elm/compiler.rb, line 55
def initialize(runnable)
  @make = runnable

  self
end
with(runnable) click to toggle source
# File lib/elm/compiler.rb, line 13
def self.with(runnable)
  Compiler.new runnable
end

Public Instance Methods

content(data, with_options: Elm::Options.new) click to toggle source
# File lib/elm/compiler.rb, line 34
def content(data, with_options: Elm::Options.new)
  Tempfile.open(['elm', '.elm']) do |tempfile|
    tempfile.write data
    files [tempfile.path], with_options: with_options
  end
end
files(files_list, with_options: Elm::Options.new) click to toggle source
# File lib/elm/compiler.rb, line 18
def files(files_list, with_options: Elm::Options.new)
  Files.new @make, files_list, with_options
end