class S3Ranger::Location

Attributes

bucket[RW]
path[RW]

Public Class Methods

new(path, bucket=nil) click to toggle source
# File lib/s3ranger/sync.rb, line 46
def initialize path, bucket=nil
  raise RuntimeError if path.nil?
  @path = path
  @bucket = bucket || nil
end

Public Instance Methods

==(other) click to toggle source
# File lib/s3ranger/sync.rb, line 63
def == other
  @path == other.path and @bucket == other.bucket
end
Also aliased as: eql?
eql?(other)
Alias for: ==
local?() click to toggle source
# File lib/s3ranger/sync.rb, line 59
def local?
  @bucket.nil?
end
to_s() click to toggle source
# File lib/s3ranger/sync.rb, line 52
def to_s
  out = []
  out << @bucket unless @bucket.nil?
  out << @path
  out.join ':'
end