Class: General::GPrePartial
- Inherits:
-
Object
- Object
- General::GPrePartial
- Defined in:
- lib/gprepartials/gprepartial.rb
Overview
Created: 1 - 30 - 2017
Instance Method Summary collapse
-
#apply ⇒ Object
Applies the GPrePartial.
-
#initialize(match) ⇒ GPrePartial
constructor
Creates a new GPrePartial.
-
#to_s ⇒ Object
Returns the string representation of the GPrePartial.
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
#apply ⇒ Object
Applies the GPrePartial
Return: the value returned from the executed GPrePartial
38 |
# File 'lib/gprepartials/gprepartial.rb', line 38 def apply; @text; end |
#to_s ⇒ Object
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 |