Class: Hx::AddPath
Instance Method Summary collapse
- #each_entry_path(selector) ⇒ Object
- #edit_entry(path, prototype = nil) ⇒ Object
- #get_entry(path) ⇒ Object
Methods included from CircumfixPath
Methods included from Filter
Methods included from View
Instance Method Details
#each_entry_path(selector) ⇒ Object
197 198 199 200 201 202 203 |
# File 'lib/hx.rb', line 197 def each_entry_path(selector) selector = selector.assume_circumfix(@prefix, @suffix) @input.each_entry_path(selector) do |path| yield add_circumfix(path) end self end |
#edit_entry(path, prototype = nil) ⇒ Object
190 191 192 193 194 195 |
# File 'lib/hx.rb', line 190 def edit_entry(path, prototype=nil) path = strip_circumfix(path) raise EditingNotSupportedError, "Editing not supported for #{path}" unless path @input.edit_entry(path, prototype) { |text| yield text } self end |
#get_entry(path) ⇒ Object
205 206 207 208 209 |
# File 'lib/hx.rb', line 205 def get_entry(path) path = strip_circumfix(path) raise NoSuchEntryError, path unless path @input.get_entry(path) end |