class Cucumber::Core::Gherkin::Writer::Gherkin
Public Class Methods
Source
# File lib/cucumber/core/gherkin/writer.rb, line 18 def initialize(uri, &source) @uri = uri @source = source end
Public Instance Methods
Source
# File lib/cucumber/core/gherkin/writer.rb, line 38 def build instance_exec(&@source) Document.new(@uri, @feature.build.join("\n")) end
Source
# File lib/cucumber/core/gherkin/writer.rb, line 23 def comment(line) comment_lines << "# #{line}" end
Source
# File lib/cucumber/core/gherkin/writer.rb, line 27 def comment_lines @comment_lines ||= [] end
Source
# File lib/cucumber/core/gherkin/writer.rb, line 31 def feature(*args, &source) @feature = Feature.new(comment_lines, *args).tap do |builder| builder.instance_exec(&source) if source end self end