module CucumberFM::FeatureElement::Component::Title

Public Instance Methods

title() click to toggle source
# File lib/cucumber_f_m/feature_element/component/title.rb, line 6
def title
  @title ||= fetch_title
end

Private Instance Methods

fetch_title() click to toggle source
# File lib/cucumber_f_m/feature_element/component/title.rb, line 16
def fetch_title
  if tag_line = title_line_pattern.match(raw)
    tag_line[0].gsub(/^[^:]*:/,'').strip
  else
    '--- no title found'
  end
end
title_line_pattern() click to toggle source
# File lib/cucumber_f_m/feature_element/component/title.rb, line 12
def title_line_pattern
  /^\s*[A-Z][a-z]+:\s.*$/
end