Class: Luoma::TemplateSource

Inherits:
Object
  • Object
show all
Defined in:
lib/luoma/loader.rb,
sig/luoma/loader.rbs

Overview

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.

Parameters:

  • source: (String)
  • name: (String)
  • up_to_date: (Proc::_Callable, nil) (defaults to: nil)
  • matter: (t_namespace, nil) (defaults to: nil)


27
28
29
30
31
32
# File 'lib/luoma/loader.rb', line 27

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

#mattert_namespace?

Returns the value of attribute matter.

Returns:

  • (t_namespace, nil)


25
26
27
# File 'lib/luoma/loader.rb', line 25

def matter
  @matter
end

#nameString

Returns the value of attribute name.

Returns:

  • (String)


25
26
27
# File 'lib/luoma/loader.rb', line 25

def name
  @name
end

#sourceString

Returns the value of attribute source.

Returns:

  • (String)


25
26
27
# File 'lib/luoma/loader.rb', line 25

def source
  @source
end

#up_to_dateProc::_Callable?

Returns the value of attribute up_to_date.

Returns:

  • (Proc::_Callable, nil)


25
26
27
# File 'lib/luoma/loader.rb', line 25

def up_to_date
  @up_to_date
end