Class: Cucumber::Formatter::ApiDocs::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/formatter/api_docs.rb

Class Method Summary collapse

Class Method Details

.create(tag) ⇒ Object



42
43
44
45
46
47
# File 'lib/cucumber/formatter/api_docs.rb', line 42

def self.create(tag)
  key = tag.gsub("@", "")
  name = key.gsub("_", " ").capitalize

  new(key: key, name: name)
end

.for_tag(tag) ⇒ Object



37
38
39
40
# File 'lib/cucumber/formatter/api_docs.rb', line 37

def self.for_tag(tag)
  @groups ||= {}
  @groups[tag] ||= create(tag)
end