Class: Blazing::Hook
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target) ⇒ Hook
constructor
A new instance of Hook.
- #rake_command ⇒ Object
- #setup ⇒ Object
Constructor Details
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
8 9 10 |
# File 'lib/blazing/hook.rb', line 8 def target @target end |
Instance Method Details
#rake_command ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/blazing/hook.rb', line 22 def rake_command rake_config = @config.instance_variable_get("@rake") || {} rails_env = "RAILS_ENV=#{@options[:rails_env]}" if @options[:rails_env] if rake_config[:task] "#{rake_config[:env]} #{rails_env} bundle exec rake #{rake_config[:task]}" end end |
#setup ⇒ Object
17 18 19 20 |
# File 'lib/blazing/hook.rb', line 17 def setup prepare_hook deploy_hook end |