Class: Amigrind::Blueprints::Provisioners::FileUpload
- Inherits:
-
Amigrind::Blueprints::Provisioner
- Object
- Amigrind::Blueprints::Provisioner
- Amigrind::Blueprints::Provisioners::FileUpload
- Defined in:
- lib/amigrind/blueprints/provisioners/file_upload.rb
Instance Method Summary collapse
Methods inherited from Amigrind::Blueprints::Provisioner
Instance Method Details
#direction=(dir) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/amigrind/blueprints/provisioners/file_upload.rb', line 9 def direction=(dir) case dir when :download, :upload @direction_method = dir.to_s else raise "unrecognized 'direction': #{dir}" end end |
#to_racker_hash ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/amigrind/blueprints/provisioners/file_upload.rb', line 18 def to_racker_hash { type: 'file', source: @source, destination: @destination, direction: @direction_method }.delete_if { |_, v| v.nil? } end |