Class: Shojiku::Sources

Inherits:
Data
  • Object
show all
Defined in:
lib/shojiku/sources.rb

Overview

The sources one render runs over: the template text, the definitions text when there are any, and the directory bundled assets resolve against.

A value rather than a file layout, because there are two ways to get one and only one of them involves the filesystem. TemplateRoot produces it by resolving a NAME; Client#generate_source produces it from bytes the application already has. Everything downstream — the request envelope, the engine — sees the same object either way, which is what keeps the second entrance from being a second code path.

Instance Attribute Summary collapse

Instance Attribute Details

#assets_dirObject (readonly)

Returns the value of attribute assets_dir

Returns:

  • (Object)

    the current value of assets_dir



13
14
15
# File 'lib/shojiku/sources.rb', line 13

def assets_dir
  @assets_dir
end

#definitionsObject (readonly)

Returns the value of attribute definitions

Returns:

  • (Object)

    the current value of definitions



13
14
15
# File 'lib/shojiku/sources.rb', line 13

def definitions
  @definitions
end

#templateObject (readonly)

Returns the value of attribute template

Returns:

  • (Object)

    the current value of template



13
14
15
# File 'lib/shojiku/sources.rb', line 13

def template
  @template
end