Class: Liquid2::TemplateSource

Inherits:
Object
  • Object
show all
Defined in:
lib/liquid2/loader.rb

Overview

Liquid template source text and meta data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source:, name:, up_to_date: nil, matter: nil) ⇒ TemplateSource

Returns a new instance of TemplateSource.



10
11
12
13
14
15
# File 'lib/liquid2/loader.rb', line 10

def initialize(source:, name:, up_to_date: nil, matter: nil)
  @source = source
  @name = name
  @up_to_date = up_to_date
  @matter = matter
end

Instance Attribute Details

#matterObject (readonly)

Returns the value of attribute matter.



8
9
10
# File 'lib/liquid2/loader.rb', line 8

def matter
  @matter
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/liquid2/loader.rb', line 8

def name
  @name
end

#sourceObject (readonly)

Returns the value of attribute source.



8
9
10
# File 'lib/liquid2/loader.rb', line 8

def source
  @source
end

#up_to_dateObject (readonly)

Returns the value of attribute up_to_date.



8
9
10
# File 'lib/liquid2/loader.rb', line 8

def up_to_date
  @up_to_date
end