Class: LowLoad::RubyAdapter
- Defined in:
- lib/adapters/ruby_adapter.rb
Constant Summary collapse
- EXTENSIONS =
['rb']
Instance Method Summary collapse
-
#evaluate(file_path:) ⇒ Object
Now we can load the file into Ruby.
-
#metadata(file_path:) ⇒ Object
Map all definitions and dependencies.
-
#preload(file_path:) ⇒ Object
Then autoload all dependencies for those files.
Instance Method Details
#evaluate(file_path:) ⇒ Object
Now we can load the file into Ruby.
24 25 26 |
# File 'lib/adapters/ruby_adapter.rb', line 24 def evaluate(file_path:) load(file_path) end |
#metadata(file_path:) ⇒ Object
Map all definitions and dependencies.
12 13 14 15 16 |
# File 'lib/adapters/ruby_adapter.rb', line 12 def (file_path:) Lowkey.load(file_path) { file_path: } end |
#preload(file_path:) ⇒ Object
Then autoload all dependencies for those files.
19 20 21 |
# File 'lib/adapters/ruby_adapter.rb', line 19 def preload(file_path:) Loader.add_autoloads(file_proxy: Lowkey[file_path]) end |