Class: Cucumber::HTMLFormatter::TemplateWriter
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-html-formatter-19.2.0/lib/cucumber/html_formatter/template_writer.rb
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(template) ⇒ TemplateWriter
constructor
A new instance of TemplateWriter.
- #write_between(from, to) ⇒ Object
Constructor Details
#initialize(template) ⇒ TemplateWriter
Returns a new instance of TemplateWriter.
6 7 8 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-html-formatter-19.2.0/lib/cucumber/html_formatter/template_writer.rb', line 6 def initialize(template) @template = template end |
Instance Attribute Details
#template ⇒ Object (readonly)
Returns the value of attribute template.
4 5 6 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-html-formatter-19.2.0/lib/cucumber/html_formatter/template_writer.rb', line 4 def template @template end |
Instance Method Details
#write_between(from, to) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-html-formatter-19.2.0/lib/cucumber/html_formatter/template_writer.rb', line 10 def write_between(from, to) from_exists = !from.nil? && template.include?(from) after_from = from_exists ? template.split(from)[1] : template before_to = to.nil? ? after_from : after_from.split(to)[0] return before_to end |