Class: S3sync::Node

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

Overview

———- NODE ———- #

Direct Known Subclasses

LocalNode, S3Node

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = '', size = 0, tag = '') ⇒ Node

Returns a new instance of Node.



417
418
419
420
421
# File 'lib/s3sync/s3sync.rb', line 417

def initialize(name='', size = 0, tag = '')
  @name = name
  @size = size
  @tag = tag
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



414
415
416
# File 'lib/s3sync/s3sync.rb', line 414

def name
  @name
end

#sizeObject (readonly)

Returns the value of attribute size.



415
416
417
# File 'lib/s3sync/s3sync.rb', line 415

def size
  @size
end

#tagObject (readonly)

Returns the value of attribute tag.



416
417
418
# File 'lib/s3sync/s3sync.rb', line 416

def tag
  @tag
end

Instance Method Details

#directory?Boolean

Returns:

  • (Boolean)


422
423
424
# File 'lib/s3sync/s3sync.rb', line 422

def directory?()
  @tag == $S3syncDirTag and @size == $S3syncDirString.length
end