Class: Hx::Overlay
Instance Method Summary collapse
- #each_entry_path(selector) ⇒ Object
- #get_entry(path) ⇒ Object
-
#initialize(*inputs) ⇒ Overlay
constructor
A new instance of Overlay.
Methods included from Filter
Methods included from View
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
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 |