class S3Ranger::Node

Attributes

base[RW]
path[RW]
size[RW]

Public Class Methods

new(base, path, size) click to toggle source
# File lib/s3ranger/sync.rb, line 77
def initialize base, path, size
  @base = base.squeeze '/'
  @path = path.squeeze '/'
  @size = size
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/s3ranger/sync.rb, line 91
def <=> other
  if self.size < other.size
    -1
  elsif self.size > other.size
    1
  else
    0
  end
end
==(other) click to toggle source
# File lib/s3ranger/sync.rb, line 87
def == other
  full == other.full and @size == other.size
end
Also aliased as: eql?
eql?(other)
Alias for: ==
full() click to toggle source
# File lib/s3ranger/sync.rb, line 83
def full
  S3Ranger.safe_join [@base, @path]
end