Class: AWS::S3::Logging::Status::Builder

Inherits:
XmlGenerator
  • Object
show all
Defined in:
lib/aws-matt/s3/logging.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logging_status) ⇒ Builder

Returns a new instance of Builder.



69
70
71
72
# File 'lib/aws-matt/s3/logging.rb', line 69

def initialize(logging_status)
  @logging_status = logging_status
  super()
end

Instance Attribute Details

#logging_statusObject (readonly)

Returns the value of attribute logging_status.



68
69
70
# File 'lib/aws-matt/s3/logging.rb', line 68

def logging_status
  @logging_status
end

Instance Method Details

#buildObject



74
75
76
77
78
79
80
81
82
83
# File 'lib/aws-matt/s3/logging.rb', line 74

def build
  xml.tag!('BucketLoggingStatus', 'xmlns' => 'http://s3.amazonaws.com/doc/2006-03-01/') do
    if logging_status.target_bucket && logging_status.target_prefix
      xml.LoggingEnabled do
        xml.TargetBucket logging_status.target_bucket
        xml.TargetPrefix logging_status.target_prefix
      end
    end
  end
end