Class: Droonga::Catalog::Base
- Inherits:
-
Object
- Object
- Droonga::Catalog::Base
- Defined in:
- lib/droonga/catalog/base.rb
Instance Attribute Summary collapse
-
#base_path ⇒ Object
readonly
Returns the value of attribute base_path.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #dataset(name) ⇒ Object
- #have_dataset?(name) ⇒ Boolean
-
#initialize(data, path) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(data, path) ⇒ Base
Returns a new instance of Base.
26 27 28 29 30 |
# File 'lib/droonga/catalog/base.rb', line 26 def initialize(data, path) @data = data @path = path @base_path = File.dirname(path) end |
Instance Attribute Details
#base_path ⇒ Object (readonly)
Returns the value of attribute base_path.
25 26 27 |
# File 'lib/droonga/catalog/base.rb', line 25 def base_path @base_path end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
25 26 27 |
# File 'lib/droonga/catalog/base.rb', line 25 def path @path end |
Instance Method Details
#dataset(name) ⇒ Object
36 37 38 |
# File 'lib/droonga/catalog/base.rb', line 36 def dataset(name) datasets[name] end |
#have_dataset?(name) ⇒ Boolean
32 33 34 |
# File 'lib/droonga/catalog/base.rb', line 32 def have_dataset?(name) datasets.key?(name) end |