Class: Hx::Overlay

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

Instance Method Summary collapse

Methods included from Filter

#each_entry

Methods included from View

#each_entry, #edit_entry

Constructor Details

#initialize(*inputs) ⇒ Overlay

Returns a new instance of Overlay.



141
142
143
# File 'lib/hx.rb', line 141

def initialize(*inputs)
  @inputs = inputs
end

Instance Method Details

#each_entry_path(selector) ⇒ Object



145
146
147
148
149
150
151
152
153
154
# File 'lib/hx.rb', line 145

def each_entry_path(selector)
  seen = Set[]
  @inputs.each do |input|
    input.each_entry_path(selector) do |path|
      yield path unless seen.include? path
      seen.add path
    end
  end
  self
end

#get_entry(path) ⇒ Object

Raises:



156
157
158
159
160
161
162
163
164
# File 'lib/hx.rb', line 156

def get_entry(path)
  @inputs.each do |input|
    begin
      return input.get_entry(path)
    rescue NoSuchEntryError
    end
  end
  raise NoSuchEntryError, path
end