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

Constructor Details

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

Returns a new instance of Borkfile.



145
146
147
148
149
150
151
152
153
# File 'lib/embork/borkfile.rb', line 145

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