Class: Unfig::FileLoader
- Inherits:
-
Object
- Object
- Unfig::FileLoader
- Defined in:
- lib/unfig/file_loader.rb
Instance Method Summary collapse
-
#initialize(params:, path:) ⇒ FileLoader
constructor
A new instance of FileLoader.
- #read ⇒ Object
Constructor Details
#initialize(params:, path:) ⇒ FileLoader
Returns a new instance of FileLoader.
3 4 5 6 |
# File 'lib/unfig/file_loader.rb', line 3 def initialize(params:, path:) @params = params @path = path end |
Instance Method Details
#read ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/unfig/file_loader.rb', line 8 def read return @_read if defined?(@_read) @_read = {} params.params.each do |p| next unless p.enabled.include?("file") @_read[p.name] = read_for(p) if data.key?(p.name) end @_read end |