Class: Hx::StripPath

Inherits:
Object
  • Object
show all
Includes:
CircumfixPath
Defined in:
lib/hx.rb

Instance Method Summary collapse

Methods included from CircumfixPath

#initialize

Methods included from Filter

#each_entry

Instance Method Details

#each_entry_path(selector) ⇒ Object



209
210
211
212
213
214
215
# File 'lib/hx.rb', line 209

def each_entry_path(selector)
  selector = selector.elide_circumfix(@prefix, @suffix)
  @input.each_entry_path(selector) do |path|
    yield strip_circumfix(path)
  end
  self
end

#edit_entry(path, prototype = nil) ⇒ Object



203
204
205
206
207
# File 'lib/hx.rb', line 203

def edit_entry(path, prototype=nil)
  path = add_circumfix(path)
  @input.edit_entry(path, prototype) { |text| yield text }
  self
end

#get_entry(path) ⇒ Object



217
218
219
# File 'lib/hx.rb', line 217

def get_entry(path)
  @input.get_entry(add_circumfix(path))
end