Class: FeaturesReport::Generator::Feature
- Inherits:
-
Object
- Object
- FeaturesReport::Generator::Feature
- Defined in:
- lib/features_report/generator.rb
Instance Method Summary collapse
- #contents_text ⇒ Object
- #header ⇒ Object
-
#initialize(feature, git) ⇒ Feature
constructor
A new instance of Feature.
- #last_author ⇒ Object
- #last_changed ⇒ Object
- #last_commit ⇒ Object
- #scenarios ⇒ Object
- #title ⇒ Object
Constructor Details
#initialize(feature, git) ⇒ Feature
Returns a new instance of Feature.
56 57 58 59 |
# File 'lib/features_report/generator.rb', line 56 def initialize(feature, git) @feature = feature @git = git end |
Instance Method Details
#contents_text ⇒ Object
85 86 87 |
# File 'lib/features_report/generator.rb', line 85 def contents_text title + "\n" + header.split("\n")[1..-1].join("\n") end |
#header ⇒ Object
61 62 63 |
# File 'lib/features_report/generator.rb', line 61 def header @feature.header end |
#last_author ⇒ Object
73 74 75 |
# File 'lib/features_report/generator.rb', line 73 def last_commit..name end |
#last_changed ⇒ Object
69 70 71 |
# File 'lib/features_report/generator.rb', line 69 def last_changed last_commit.date end |
#last_commit ⇒ Object
65 66 67 |
# File 'lib/features_report/generator.rb', line 65 def last_commit @last_commit ||= @git.last_commit(@feature) end |
#scenarios ⇒ Object
77 78 79 |
# File 'lib/features_report/generator.rb', line 77 def scenarios @feature.scenarios end |
#title ⇒ Object
81 82 83 |
# File 'lib/features_report/generator.rb', line 81 def title @feature.title end |