Module: ArchivedRemoteObject

Defined in:
lib/archived_remote_object.rb,
lib/archived_remote_object/version.rb,
lib/archived_remote_object/aws_s3/client.rb,
lib/archived_remote_object/configuration.rb,
lib/archived_remote_object/aws_s3/remote_object.rb,
lib/archived_remote_object/aws_s3/archived_object.rb,
lib/archived_remote_object/archive/archived_object.rb,
lib/archived_remote_object/archive/restored_object.rb

Defined Under Namespace

Modules: Archive, AwsS3

Constant Summary collapse

VERSION =
"0.1.5".freeze

Class Method Summary collapse

Class Method Details

.configurationObject



5
6
7
# File 'lib/archived_remote_object/configuration.rb', line 5

def configuration
  @configuration ||= OpenStruct.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



9
10
11
# File 'lib/archived_remote_object/configuration.rb', line 9

def configure
  yield(configuration)
end

.get_object(key) ⇒ Object

rubocop:disable Metrics/MethodLength



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/archived_remote_object.rb', line 10

def self.get_object(key) # rubocop:disable Metrics/MethodLength
  Archive::RestoredObject.new(
    key: key,
    archived_object: Archive::ArchivedObject.new(
      key: key,
      remote_object: AwsS3::ArchivedObject.new(
        key: key,
        remote_object: AwsS3::RemoteObject.new(
          key: key,
          remote_client: AwsS3::Client.new
        )
      )
    )
  ).call
end