Class: Fog::Local::Storage::Real
- Inherits:
 - 
      Object
      
        
- Object
 - Fog::Local::Storage::Real
 
 
- Defined in:
 - lib/fog/local/storage.rb
 
Instance Attribute Summary collapse
- 
  
    
      #endpoint  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute endpoint.
 
Instance Method Summary collapse
- #copy_object(source_directory_name, source_object_name, target_directory_name, target_object_name, options = {}) ⇒ Object
 - 
  
    
      #initialize(options = {})  ⇒ Real 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Real.
 - #local_root ⇒ Object
 - #path_to(partial) ⇒ Object
 
Constructor Details
#initialize(options = {}) ⇒ Real
Returns a new instance of Real.
      68 69 70 71 72  | 
    
      # File 'lib/fog/local/storage.rb', line 68 def initialize(={}) @local_root = ::File.([:local_root]) @endpoint = [:endpoint] || () end  | 
  
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
      66 67 68  | 
    
      # File 'lib/fog/local/storage.rb', line 66 def endpoint @endpoint end  | 
  
Instance Method Details
#copy_object(source_directory_name, source_object_name, target_directory_name, target_object_name, options = {}) ⇒ Object
      82 83 84 85 86 87  | 
    
      # File 'lib/fog/local/storage.rb', line 82 def copy_object(source_directory_name, source_object_name, target_directory_name, target_object_name, ={}) source_path = path_to(::File.join(source_directory_name, source_object_name)) target_path = path_to(::File.join(target_directory_name, target_object_name)) ::FileUtils.mkdir_p(::File.dirname(target_path)) ::FileUtils.copy_file(source_path, target_path) end  | 
  
#local_root ⇒ Object
      74 75 76  | 
    
      # File 'lib/fog/local/storage.rb', line 74 def local_root @local_root end  | 
  
#path_to(partial) ⇒ Object
      78 79 80  | 
    
      # File 'lib/fog/local/storage.rb', line 78 def path_to(partial) ::File.join(@local_root, partial) end  |