Class: MKBrut::Segments::Demo
Overview
Additional classes and configuration for a new Brut app that provides a more demonstration of the features.
Constant Summary
Constants included from MKBrut
Class Method Summary collapse
Instance Method Summary collapse
- #add! ⇒ Object
-
#initialize(app_options:, current_dir:, templates_dir:) ⇒ Demo
constructor
A new instance of Demo.
Methods inherited from Base
Constructor Details
#initialize(app_options:, current_dir:, templates_dir:) ⇒ Demo
Returns a new instance of Demo.
7 8 9 10 11 |
# File 'lib/mkbrut/segments/demo.rb', line 7 def initialize(app_options:, current_dir:, templates_dir:) @project_root = current_dir / .app_name @templates_dir = templates_dir / "segments" / "Demo" @erb_binding = ErbBindingDelegate.new() end |
Class Method Details
.friendly_name ⇒ Object
5 |
# File 'lib/mkbrut/segments/demo.rb', line 5 def self.friendly_name = "Demo features and files" |
Instance Method Details
#add! ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/mkbrut/segments/demo.rb', line 13 def add! operations = copy_files(@templates_dir, @project_root) + other_operations(@project_root) operations.each do |operation| operation.call end end |