class General::GFullPlaceholder
Inserts the full data value passed into the template
Author: Anshul Kharbanda Created: 1 - 19 - 2016
Constants
- REGEX
Matches GFullPlaceholders
- STRING
String representation of
GFullPlaceholder
Public Class Methods
Initializes the GFullPlaceholder
with the given match
Parameter: match - the match data from the string being parsed Parameter: defaults - the hash of default data from the GTemplate
# File lib/gpartials/gfullplaceholder.rb, line 40 def initialize(match, defaults={}); super({name: :__full}, defaults); end
Public Instance Methods
Returns a string representation of the given data
Parameter: data - the data being applied
Returns: a string representation of the given data
# File lib/gpartials/gfullplaceholder.rb, line 47 def apply(data); data.to_s; end
Raises TypeError
Parameter: first - true if this is the first in a given template
Raises: TypeError
# File lib/gpartials/gfullplaceholder.rb, line 61 def regex(first=false); raise TypeError.new("GFullPlaceholder cannot be matched"); end
Returns a string representation of the GFullPlaceholder
Parameter: first - true if this is the first in a given template
Returns: a string representation of the GFullPlaceholder
# File lib/gpartials/gfullplaceholder.rb, line 54 def string(first=false); STRING; end