# File lib/cucumber/core/gherkin/writer.rb, line 17 def initialize(uri, &source) @uri, @source = uri, source end
# File lib/cucumber/core/gherkin/writer.rb, line 36 def build instance_exec(&@source) Document.new(@uri, @feature.build.join("\n")) end
# File lib/cucumber/core/gherkin/writer.rb, line 21 def comment(line) comment_lines << "# #{line}" end
# File lib/cucumber/core/gherkin/writer.rb, line 25 def comment_lines @comment_lines ||= [] end
# File lib/cucumber/core/gherkin/writer.rb, line 29 def feature(*args, &source) @feature = Feature.new(comment_lines, *args).tap do |builder| builder.instance_exec(&source) if source end self end