Class: LowLoad::RubyAdapter
- Defined in:
- lib/adapters/ruby_adapter.rb
Constant Summary collapse
- EXTENSIONS =
['rb'].freeze
Instance Method Summary collapse
-
#evaluate(file_path:) ⇒ Object
Now we can load the file into Ruby.
-
#mapload(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.
22 23 24 |
# File 'lib/adapters/ruby_adapter.rb', line 22 def evaluate(file_path:) load(file_path) end |
#mapload(file_path:) ⇒ Object
Map all definitions and dependencies.
12 13 14 |
# File 'lib/adapters/ruby_adapter.rb', line 12 def mapload(file_path:) Lowkey.load(file_path) end |
#preload(file_path:) ⇒ Object
Then autoload all dependencies for those files.
17 18 19 |
# File 'lib/adapters/ruby_adapter.rb', line 17 def preload(file_path:) Loader.add_autoloads(file_proxy: Lowkey[file_path]) end |