Class: Fog::Local::Storage::Real

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/storage/local.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Real

Returns a new instance of Real.



60
61
62
63
64
65
66
67
68
69
70
# File 'lib/fog/storage/local.rb', line 60

def initialize(options={})
  unless options.delete(:provider)
    location = caller.first
    warning = "[yellow][WARN] Fog::Local::Storage.new is deprecated, use Fog::Storage.new(:provider => 'Local') instead[/]"
    warning << " [light_black](" << location << ")[/] "
    Formatador.display_line(warning)
  end

  require 'mime/types'
  @local_root = ::File.expand_path(options[:local_root])
end

Instance Method Details

#local_rootObject



72
73
74
# File 'lib/fog/storage/local.rb', line 72

def local_root
  @local_root
end

#path_to(partial) ⇒ Object



76
77
78
# File 'lib/fog/storage/local.rb', line 76

def path_to(partial)
  ::File.join(@local_root, partial)
end