Class: TestData::CustomLoaders::AbstractBase
- Inherits:
-
Object
- Object
- TestData::CustomLoaders::AbstractBase
- Defined in:
- lib/test_data/custom_loaders/abstract_base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #load(**options) ⇒ Object
- #load_requested(**options) ⇒ Object
- #loaded?(**options) ⇒ Boolean
- #name ⇒ Object
Instance Method Details
#load(**options) ⇒ Object
20 21 22 |
# File 'lib/test_data/custom_loaders/abstract_base.rb', line 20 def load(**) raise Error.new("#load must be defined by CustomLoader subclass") end |
#load_requested(**options) ⇒ Object
8 9 |
# File 'lib/test_data/custom_loaders/abstract_base.rb', line 8 def load_requested(**) end |
#loaded?(**options) ⇒ Boolean
11 12 13 14 15 16 17 18 |
# File 'lib/test_data/custom_loaders/abstract_base.rb', line 11 def loaded?(**) # Check to see if the requested data is already loaded (if possible and # detectable) # # Return true to prevent #load from being called, potentially avoiding an # expensive operation false end |
#name ⇒ Object
4 5 6 |
# File 'lib/test_data/custom_loaders/abstract_base.rb', line 4 def name raise Error.new("#name must be defined by CustomLoader subclass") end |