lib/macros4cuke/templating/section.rb in macros4cuke-0.5.14 vs lib/macros4cuke/templating/section.rb in macros4cuke-0.5.15
- old
+ new
@@ -20,12 +20,10 @@
def initialize(aVarName)
super(aVarName)
@children = []
end
- public
-
# Add a child element as member of the section
def add_child(aChild)
children << aChild
end
@@ -49,11 +47,11 @@
# 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(_, _)
msg = "Method Section.#{__method__} must be implemented in subclass."
- fail(NotImplementedError, msg)
+ raise(NotImplementedError, msg)
end
end # class
# A specialized section in a template for which its rendition
@@ -69,11 +67,9 @@
# if a value exists for the variable.
def initialize(aVarName, renderWhenExisting = true)
super(aVarName)
@existence = renderWhenExisting
end
-
- 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.