Class: Carrierwave::Nightcrawler::Swift::Storage::SwiftFile
- Inherits:
-
Object
- Object
- Carrierwave::Nightcrawler::Swift::Storage::SwiftFile
- Defined in:
- lib/carrierwave/nightcrawler/swift/storage.rb
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(attrs) ⇒ SwiftFile
constructor
A new instance of SwiftFile.
- #path ⇒ Object
- #url(options = {}) ⇒ Object
Constructor Details
#initialize(attrs) ⇒ SwiftFile
Returns a new instance of SwiftFile.
19 20 21 |
# File 'lib/carrierwave/nightcrawler/swift/storage.rb', line 19 def initialize(attrs) @attrs = attrs end |
Instance Method Details
#delete ⇒ Object
31 32 33 34 |
# File 'lib/carrierwave/nightcrawler/swift/storage.rb', line 31 def delete delete = NightcrawlerSwift::Delete.new delete.execute path end |
#path ⇒ Object
23 24 25 |
# File 'lib/carrierwave/nightcrawler/swift/storage.rb', line 23 def path @attrs["name"] end |
#url(options = {}) ⇒ Object
27 28 29 |
# File 'lib/carrierwave/nightcrawler/swift/storage.rb', line 27 def url( = {}) "#{NightcrawlerSwift.connection.public_url}/#{NightcrawlerSwift..bucket}/#{path}" end |