Sha256: c2020c681a6d5a26e6d6dc67cdc7c5e3de15bd36665b89b4103079dce74c2cb8
Contents?: true
Size: 657 Bytes
Versions: 12
Compression:
Stored size: 657 Bytes
Contents
module Cucumber module Ast # Holds the value of a comment parsed from a feature file: # # # Lorem ipsum # # dolor sit amet # # This gets parsed into a Comment with value <tt>"# Lorem ipsum\n# dolor sit amet\n"</tt> # class Comment def initialize(value) @value = value end def empty? @value.nil? || @value == "" end def accept(visitor) @value.strip.split("\n").each do |line| visitor.visit_comment_line(line.strip) end end def to_sexp (@value.nil? || @value == '') ? nil : [:comment, @value] end end end end
Version data entries
12 entries across 12 versions & 6 rubygems