Class: Webpacker::FileLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/webpacker/file_loader.rb

Overview

Provides a base singleton-configuration pattern for loading a file, given a path

Direct Known Subclasses

Configuration, Env, Manifest

Defined Under Namespace

Classes: FileLoaderError, NotFoundError

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data.



7
8
9
# File 'lib/webpacker/file_loader.rb', line 7

def data
  @data
end

Class Method Details

.load(path = file_path) ⇒ Object



10
11
12
# File 'lib/webpacker/file_loader.rb', line 10

def load(path = file_path)
  self.instance = new(path)
end