class General::GPartial

A unit of the GTemplate. Returns a string based on an argument hash When GTemplate is applied

Author: Anshul Kharbanda Created: 7 - 29 - 2016

Constants

ARGUMENT

Regular expression that matches a single placeholder

ARGUMENTS

Regular expression that matches placeholder arguments

NAME

Regular expression that matches placeholder names

OPERATION

Regular expression that matches placeholder operations

Attributes

name[R]

Get name

Public Class Methods

new(obj,dft={}) click to toggle source

Initializes the GPartial with the given object

Parameter: obj - the object containing information for the partial Parameter: dft - the hash of default data from the GTemplate

# File lib/gpartials/gpartial.rb, line 51
def initialize(obj,dft={}); @name = obj[:name].to_sym; end