Class: General::GPrePartial

Inherits:
Object
  • Object
show all
Defined in:
lib/gprepartials/gprepartial.rb

Overview

Created: 1 - 30 - 2017

Direct Known Subclasses

GExtend, GInclude, GPretext, GYield

Instance Method Summary collapse

Constructor Details

#initialize(match) ⇒ GPrePartial

Creates a new GPrePartial

Parameters: match - the match result returned from the parser



33
# File 'lib/gprepartials/gprepartial.rb', line 33

def initialize(match); @text = match.to_s; end

Instance Method Details

#applyObject

Applies the GPrePartial

Return: the value returned from the executed GPrePartial



38
# File 'lib/gprepartials/gprepartial.rb', line 38

def apply; @text; end

#to_sObject

Returns the string representation of the GPrePartial

Return: the string representation of the GPrePartial



43
# File 'lib/gprepartials/gprepartial.rb', line 43

def to_s; @text; end