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
28 29 30 31 32 33 34 35 |
# File 'lib/config_for/capistrano.rb', line 28 def initialize(path, = {}, &block) @path = path @roles = .fetch(:roles, :all) @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.
15 16 17 |
# File 'lib/config_for/capistrano.rb', line 15 def generator @generator end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
13 14 15 |
# File 'lib/config_for/capistrano.rb', line 13 def path @path end |
#tempfile ⇒ Object (readonly)
Returns the value of attribute tempfile.
13 14 15 |
# File 'lib/config_for/capistrano.rb', line 13 def tempfile @tempfile end |