Class: Liquid2::Partial

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

Overview

Partial template meta data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, scope, in_scope) ⇒ Partial

Returns a new instance of Partial.

Parameters:

  • name (Expression | String)

    The name of the partial template.

  • scope (:shared | :isolated | :inherited)

    A symbol indicating the kind of scope the partial template should have when loaded.

  • in_scope (Array[Identifier])

    Names that will be added to the scope of the partial template.



54
55
56
57
58
# File 'lib/liquid2/node.rb', line 54

def initialize(name, scope, in_scope)
  @name = name
  @scope = scope
  @in_scope = in_scope
end

Instance Attribute Details

#in_scopeObject (readonly)

Returns the value of attribute in_scope.



47
48
49
# File 'lib/liquid2/node.rb', line 47

def in_scope
  @in_scope
end

#nameObject (readonly)

Returns the value of attribute name.



47
48
49
# File 'lib/liquid2/node.rb', line 47

def name
  @name
end

#scopeObject (readonly)

Returns the value of attribute scope.



47
48
49
# File 'lib/liquid2/node.rb', line 47

def scope
  @scope
end