Class: Valise::Set::StemmedDefiner

Inherits:
Object
  • Object
show all
Includes:
Unpath
Defined in:
lib/valise/set/definer.rb

Instance Method Summary collapse

Methods included from Unpath

#repath, #unpath

Constructor Details

#initialize(path, set) ⇒ StemmedDefiner

Returns a new instance of StemmedDefiner.



9
10
11
12
# File 'lib/valise/set/definer.rb', line 9

def initialize(path, set)
  @segments = unpath(path)
  @target = set
end

Instance Method Details

#ro(name) ⇒ Object



19
20
21
22
# File 'lib/valise/set/definer.rb', line 19

def ro(name)
  @target.add_search_root(
    StemDecorator.new(@segments, ReadOnlySearchRoot.new(name)))
end

#rw(name) ⇒ Object



14
15
16
17
# File 'lib/valise/set/definer.rb', line 14

def rw(name)
  @target.add_search_root(
    StemDecorator.new(@segments, SearchRoot.new(name)))
end