lib/macros4cuke/templating/engine.rb in macros4cuke-0.3.39 vs lib/macros4cuke/templating/engine.rb in macros4cuke-0.3.40
- old
+ new
@@ -25,11 +25,11 @@
# from the template that must be rendered verbatim.
def initialize(aSourceText)
@source = aSourceText
end
-public
+ public
# Render the static text.
# This method has the same signature as the {Engine#render} method.
# @return [String] Static text is returned verbatim ("as is")
def render(aContextObject, theLocals)
@@ -39,11 +39,11 @@
# Class used internally by the template engine.
# Represents an end of line that must be rendered as such.
class EOLine
-public
+ public
# Render an end of line.
# This method has the same signature as the {Engine#render} method.
# @return [String] An end of line marker. Its exact value is OS-dependent.
def render(aContextObject, theLocals)
return "\n"
@@ -61,11 +61,11 @@
# @param aVarName [String] The name of the placeholder from a template.
def initialize(aVarName)
@name = aVarName
end
-protected
+ protected
# This method has the same signature as the {Engine#render} method.
# @return [Object] The actual value from the locals or context
# that is assigned to the variable.
def retrieve_value_from(aContextObject, theLocals)
@@ -86,11 +86,11 @@
# a name placed between <..> in the template.
# At rendition, a placeholder is replaced by the text value
# that is associated with it.
class Placeholder < UnaryElement
-public
+ public
# Render the placeholder given the passed arguments.
# This method has the same signature as the {Engine#render} method.
# @return [String] The text value assigned to the placeholder.
# Returns an empty string when no value is assigned to the placeholder.
def render(aContextObject, theLocals)
@@ -128,11 +128,11 @@
def initialize(aVarName)
super(aVarName)
@children = []
end
-public
+ public
# Add a child element as member of the section
def add_child(aChild)
children << aChild
end
@@ -502,6 +502,6 @@
end # module
end # module
-# End of file
\ No newline at end of file
+# End of file