Class: Embork::Borkfile

Inherits:
Object
  • Object
show all
Includes:
Attributes
Defined in:
lib/embork/borkfile.rb

Defined Under Namespace

Modules: Attributes Classes: DSL

Instance Attribute Summary

Attributes included from Attributes

#asset_paths, #backend, #compressor, #es6_transform, #frameworks, #helpers, #html, #phrender_index_file, #phrender_javascript_paths, #phrender_raw_javascript, #project_root, #sprockets_engines, #sprockets_postprocessors, #sprockets_preprocessors

Instance Method Summary collapse

Methods included from Attributes

#es6_namespace, #keep_old_versions

Constructor Details

#initialize(path_to_borkfile, environment = :development) ⇒ Borkfile

Returns a new instance of Borkfile.



150
151
152
153
154
155
156
157
158
# File 'lib/embork/borkfile.rb', line 150

def initialize(path_to_borkfile, environment = :development)
  @logger = Embork::Logger.new(STDOUT, :simple)
  @path_to_borkfile = path_to_borkfile
  @environment = environment.to_sym
  check_borkfile
  file = DSL.new(environment, @logger)
  file.get_binding.eval File.read(@path_to_borkfile)
  set_options file
end