Class: Lilac::CLI::PageCompiler::Injection

Inherits:
Struct
  • Object
show all
Defined in:
lib/lilac/cli/build/page_compiler.rb

Overview

Output of build_injection. The injection HTML is what gets spliced before </body>; page_local_mrb is non-nil only in the :compiled × :bundle case, where the per-page bytecode has to be chained into the boot module instead of getting its own <script> tag.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#htmlObject

Returns the value of attribute html

Returns:

  • (Object)

    the current value of html



42
43
44
# File 'lib/lilac/cli/build/page_compiler.rb', line 42

def html
  @html
end

#page_local_mrbObject

Returns the value of attribute page_local_mrb

Returns:

  • (Object)

    the current value of page_local_mrb



42
43
44
# File 'lib/lilac/cli/build/page_compiler.rb', line 42

def page_local_mrb
  @page_local_mrb
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/lilac/cli/build/page_compiler.rb', line 43

def empty?
  html.to_s.empty?
end