Class: ConfigFor::Capistrano::UploadFileTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- ConfigFor::Capistrano::UploadFileTask
- Includes:
- Capistrano::DSL
- Defined in:
- lib/config_for/capistrano.rb
Instance Attribute Summary collapse
-
#generator ⇒ Object
Returns the value of attribute generator.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#tempfile ⇒ Object
readonly
Returns the value of attribute tempfile.
Instance Method Summary collapse
-
#initialize(path, options = {}) {|file| ... } ⇒ UploadFileTask
constructor
Rake Task generator for uploading files through Capistrano.
Constructor Details
#initialize(path, options = {}) {|file| ... } ⇒ UploadFileTask
Rake Task generator for uploading files through Capistrano
30 31 32 33 34 35 36 37 38 |
# File 'lib/config_for/capistrano.rb', line 30 def initialize(path, = {}, &block) @path = path @roles = .fetch(:roles, :all) @override = .fetch(:override, false) @tempfile = ::Tempfile.new(File.basename(@path)) @generator = block || ->(_file){ puts 'Did not passed file generator' } define end |
Instance Attribute Details
#generator ⇒ Object
Returns the value of attribute generator.
16 17 18 |
# File 'lib/config_for/capistrano.rb', line 16 def generator @generator end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
14 15 16 |
# File 'lib/config_for/capistrano.rb', line 14 def path @path end |
#tempfile ⇒ Object (readonly)
Returns the value of attribute tempfile.
14 15 16 |
# File 'lib/config_for/capistrano.rb', line 14 def tempfile @tempfile end |