Module: Relaton::Index
- Defined in:
- lib/relaton/index.rb,
lib/relaton/index/pool.rb,
lib/relaton/index/type.rb,
lib/relaton/index/util.rb,
lib/relaton/index/config.rb,
lib/relaton/index/file_io.rb,
lib/relaton/index/version.rb,
lib/relaton/index/file_storage.rb
Defined Under Namespace
Modules: FileStorage, Util Classes: Config, Error, FileIO, Pool, Type
Constant Summary collapse
- VERSION =
"0.2.16"
Class Method Summary collapse
- .close(type) ⇒ Object
-
.config ⇒ Relaton::Index::Config
Create new config object or return existing.
-
.configure {|config| ... } ⇒ void
Configure Relaton::Index.
-
.find_or_create(type, **args) ⇒ Object
Proxy for Pool#type.
-
.pool ⇒ Relaton::Index::Pool
Create new index pool object or return existing.
Class Method Details
.close(type) ⇒ Object
28 29 30 |
# File 'lib/relaton/index.rb', line 28 def close(type) pool.remove type end |
.config ⇒ Relaton::Index::Config
Create new config object or return existing
46 47 48 |
# File 'lib/relaton/index.rb', line 46 def config @config ||= Config.new end |
.configure {|config| ... } ⇒ void
This method returns an undefined value.
Configure Relaton::Index
55 56 57 |
# File 'lib/relaton/index.rb', line 55 def configure yield config end |
.find_or_create(type, **args) ⇒ Object
Proxy for Pool#type
24 25 26 |
# File 'lib/relaton/index.rb', line 24 def find_or_create(type, **args) pool.type(type, **args) end |
.pool ⇒ Relaton::Index::Pool
Create new index pool object or return existing
37 38 39 |
# File 'lib/relaton/index.rb', line 37 def pool @pool ||= Pool.new end |