class General::GInclude

Includes another file in the template

Author: Anshul Kharbanda Created: 1 - 30 - 2017

Constants

REGEX

Regular expression matches GInclude

Public Class Methods

new(match) click to toggle source

Creates a new GInclude

Parameters: match - the match result returned from the parser

Calls superclass method
# File lib/gprepartials/ginclude.rb, line 37
def initialize(match)
        super
        @filename = match[:filename]
end

Public Instance Methods

apply() click to toggle source

Applies the GInclude

Return: the value returned from the executed GInclude

# File lib/gprepartials/ginclude.rb, line 45
def apply; IO.read(@filename+General::GIO::EXTENSION) + "\r\n"; end