Class: ArchiveStorage::StorageConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/archive_storage/storage_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ StorageConfig

Returns a new instance of StorageConfig.



20
21
22
23
24
25
26
27
# File 'lib/archive_storage/storage_config.rb', line 20

def initialize(name)
  @name = name.to_sym
  @provider = :s3
  @region = "us-east-1"
  @path_style = false
  @public = false
  @options = {}
end

Instance Attribute Details

#access_key_idObject

Returns the value of attribute access_key_id.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def access_key_id
  @access_key_id
end

#adapterObject

Returns the value of attribute adapter.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def adapter
  @adapter
end

#base_urlObject

Returns the value of attribute base_url.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def base_url
  @base_url
end

#bucketObject

Returns the value of attribute bucket.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def bucket
  @bucket
end

#endpointObject

Returns the value of attribute endpoint.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def endpoint
  @endpoint
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def name
  @name
end

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def options
  @options
end

#path_styleObject

Returns the value of attribute path_style.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def path_style
  @path_style
end

#providerObject

Returns the value of attribute provider.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def provider
  @provider
end

#publicObject

Returns the value of attribute public.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def public
  @public
end

#public_hostObject

Returns the value of attribute public_host.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def public_host
  @public_host
end

#regionObject

Returns the value of attribute region.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def region
  @region
end

#root_pathObject

Returns the value of attribute root_path.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def root_path
  @root_path
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



5
6
7
# File 'lib/archive_storage/storage_config.rb', line 5

def secret_access_key
  @secret_access_key
end

Instance Method Details

#path_style?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/archive_storage/storage_config.rb', line 29

def path_style?
  !!path_style
end

#public?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/archive_storage/storage_config.rb', line 33

def public?
  !!public
end