Class: Textus::Protocol::Handlers::Ops::SourceExpander
- Inherits:
-
Object
- Object
- Textus::Protocol::Handlers::Ops::SourceExpander
- Defined in:
- lib/textus/protocol/handlers/ops/source_expander.rb
Instance Method Summary collapse
Instance Method Details
#call(env, ctx:, depth: 0) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/textus/protocol/handlers/ops/source_expander.rb', line 6 def call(env, ctx:, depth: 0) return env if depth >= 5 raw_sources = Array(env.["sources"]) return env if raw_sources.empty? = raw_sources.map { |src| (src, ctx:, depth:) } env.with(sources: ) end |