Class: BunBo::ContentGenerator
- Inherits:
-
Object
- Object
- BunBo::ContentGenerator
- Defined in:
- lib/bun_bo/content_generator.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(root_path) ⇒ ContentGenerator
constructor
A new instance of ContentGenerator.
Constructor Details
#initialize(root_path) ⇒ ContentGenerator
Returns a new instance of ContentGenerator.
3 4 5 |
# File 'lib/bun_bo/content_generator.rb', line 3 def initialize(root_path) @root_path = root_path end |
Instance Method Details
#generate ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/bun_bo/content_generator.rb', line 7 def generate if root_path.join('spec', 'rails_helper.rb').exist? "require 'rails_helper'" elsif root_path.join('spec', 'spec_helper.rb').exist? "require 'spec_helper'" else '' end end |