Module: Hx::Filter

Overview

minimal complete definition: each_entry_path + get_entry, or each_entry

Instance Method Summary collapse

Methods included from View

#edit_entry

Instance Method Details

#each_entry(selector) ⇒ Object



67
68
69
70
71
72
73
74
75
76
# File 'lib/hx.rb', line 67

def each_entry(selector)
  each_entry_path(selector) do |path|
    begin
      entry = get_entry(path)
    rescue NoSuchEntryError
      next # entries may come and go during the enumeration
    end
    yield path, entry
  end
end

#each_entry_path(selector) ⇒ Object



63
64
65
# File 'lib/hx.rb', line 63

def each_entry_path(selector)
  each_entry(selector) { |path, entry| yield path }
end

#get_entry(path) ⇒ Object



78
79
80
# File 'lib/hx.rb', line 78

def get_entry(path)
  Hx.get_entry(self, path)
end