Class: Twig::TokenParser::Include

Inherits:
Base
  • Object
show all
Defined in:
lib/twig/token_parser/include.rb

Direct Known Subclasses

Embed

Instance Attribute Summary

Attributes inherited from Base

#parser

Instance Method Summary collapse

Instance Method Details

#parse(token) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/twig/token_parser/include.rb', line 6

def parse(token)
  expr = parser.parse_expression
  variables, only, ignore_missing = parse_arguments

  Node::Include.new(
    expr,
    variables,
    only,
    ignore_missing,
    token.lineno
  )
end

#tagObject



19
20
21
# File 'lib/twig/token_parser/include.rb', line 19

def tag
  'include'
end