Class: Giter8::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/giter8/template.rb

Overview

Template represents a Template variable in an AST. Contains a source file, the line and column where the template begins, the variable name to be looked up, a set of options, and the parent to which the node belongs to.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options, parent, source, line, column) ⇒ Template

Returns a new instance of Template.



10
11
12
13
14
15
16
17
# File 'lib/giter8/template.rb', line 10

def initialize(name, options, parent, source, line, column)
  @source = source
  @line = line
  @column = column
  @name = name
  @options = options
  @parent = parent
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



8
9
10
# File 'lib/giter8/template.rb', line 8

def column
  @column
end

#lineObject

Returns the value of attribute line.



8
9
10
# File 'lib/giter8/template.rb', line 8

def line
  @line
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/giter8/template.rb', line 8

def name
  @name
end

#optionsObject

Returns the value of attribute options.



8
9
10
# File 'lib/giter8/template.rb', line 8

def options
  @options
end

#parentObject

Returns the value of attribute parent.



8
9
10
# File 'lib/giter8/template.rb', line 8

def parent
  @parent
end

#sourceObject

Returns the value of attribute source.



8
9
10
# File 'lib/giter8/template.rb', line 8

def source
  @source
end