Class: Relaxo::QueryServer::Loader
- Inherits:
-
Object
- Object
- Relaxo::QueryServer::Loader
- Defined in:
- lib/relaxo/query_server/library.rb
Constant Summary collapse
- DEFAULT =
The default library name
['_default']
Instance Method Summary collapse
- #add_libraries(libraries) ⇒ Object
-
#initialize ⇒ Loader
constructor
A new instance of Loader.
- #load(path) ⇒ Object
- #load_default ⇒ Object
Constructor Details
#initialize ⇒ Loader
Returns a new instance of Loader.
86 87 88 |
# File 'lib/relaxo/query_server/library.rb', line 86 def initialize @libraries = {} end |
Instance Method Details
#add_libraries(libraries) ⇒ Object
94 95 96 |
# File 'lib/relaxo/query_server/library.rb', line 94 def add_libraries(libraries) @libraries.merge!(libraries) end |
#load(path) ⇒ Object
90 91 92 |
# File 'lib/relaxo/query_server/library.rb', line 90 def load(path) Library.for(@libraries, path) end |
#load_default ⇒ Object
98 99 100 |
# File 'lib/relaxo/query_server/library.rb', line 98 def load_default load(DEFAULT) end |