lib/macros4cuke/templating/section.rb in macros4cuke-0.5.07 vs lib/macros4cuke/templating/section.rb in macros4cuke-0.5.08

- old
+ new

@@ -3,16 +3,13 @@ require_relative 'unary-element' # Load the superclass module Macros4Cuke # Module used as a namespace - - # Module containing all classes implementing the simple template engine # used internally in Macros4Cuke. module Templating - # Base class used internally by the template engine. # Represents a section in a template, that is, # a set of template elements for which its rendition depends # on the value of a variable. class Section < UnaryElement @@ -39,12 +36,10 @@ case a_child when Placeholder subResult << a_child.name when Section subResult.concat(a_child.variables) - else - # Do nothing end end return all_vars.flatten.uniq end @@ -56,11 +51,10 @@ # 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) end - end # class # A specialized section in a template for which its rendition # depends on the (in)existence of an actual value bound to the variable name. @@ -101,16 +95,11 @@ # @return [String] The original text representation of the tag. def to_s() return "<?#{name}>" end - end # class - - SectionEndMarker = Struct.new(:name) - end # module - end # module # End of file