Class: Motion::Project::Config
Instance Method Summary collapse
- #post_setup_blocks ⇒ Object
- #pre_setup_blocks ⇒ Object
- #setup ⇒ Object
- #sugarcube_old_setup ⇒ Object
Instance Method Details
#post_setup_blocks ⇒ Object
22 23 24 |
# File 'lib/sugarcube_pre_setup.rb', line 22 def post_setup_blocks @post_setup_blocks ||= [] end |
#pre_setup_blocks ⇒ Object
18 19 20 |
# File 'lib/sugarcube_pre_setup.rb', line 18 def pre_setup_blocks @pre_setup_blocks ||= [] end |
#setup ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/sugarcube_pre_setup.rb', line 27 def setup app_files = @files.flatten @files = [] if @pre_setup_blocks @pre_setup_blocks.each { |b| b.call(self) } @pre_setup_blocks = nil end @files.concat(app_files) sugarcube_old_setup.tap do if @post_setup_blocks @post_setup_blocks.each { |b| b.call(self) } @post_setup_blocks = nil end end end |
#sugarcube_old_setup ⇒ Object
26 |
# File 'lib/sugarcube_pre_setup.rb', line 26 alias sugarcube_old_setup setup |