Sha256: 568915bdc3d5bc1ed0c4af0a678007fa87fed58efdf6b307bc42610a2b32a485

Contents?: true

Size: 487 Bytes

Versions: 18

Compression:

Stored size: 487 Bytes

Contents

module Terraspace::Compiler::Erb
  class Render
    def initialize(mod, src_path)
      @mod, @src_path = mod, src_path
    end

    def build
      context = Context.new(@mod)
      if @mod.resolved
        RenderMePretty.result(@src_path, context: context)
      else
        # Replace contents so only the `output` and `depends_on` are evaluated
        temp_path = Rewrite.new(@src_path).rewrite
        RenderMePretty.result(temp_path, context: context)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
terraspace-2.2.17 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.16 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.15 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.14 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.13 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.12 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.11 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.10 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.9 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.8 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.7 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.6 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.5 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.4 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.3 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.2 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.1 lib/terraspace/compiler/erb/render.rb
terraspace-2.2.0 lib/terraspace/compiler/erb/render.rb