Class: FakeS3::S3Object

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/fakes3/s3_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#content_typeObject

Returns the value of attribute content_type.



4
5
6
# File 'lib/fakes3/s3_object.rb', line 4

def content_type
  @content_type
end

#creation_dateObject

Returns the value of attribute creation_date.



4
5
6
# File 'lib/fakes3/s3_object.rb', line 4

def creation_date
  @creation_date
end

#ioObject

Returns the value of attribute io.



4
5
6
# File 'lib/fakes3/s3_object.rb', line 4

def io
  @io
end

#md5Object

Returns the value of attribute md5.



4
5
6
# File 'lib/fakes3/s3_object.rb', line 4

def md5
  @md5
end

#modified_dateObject

Returns the value of attribute modified_date.



4
5
6
# File 'lib/fakes3/s3_object.rb', line 4

def modified_date
  @modified_date
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/fakes3/s3_object.rb', line 4

def name
  @name
end

#sizeObject

Returns the value of attribute size.



4
5
6
# File 'lib/fakes3/s3_object.rb', line 4

def size
  @size
end

Instance Method Details

#<=>(object) ⇒ Object

Sort by the object’s name



15
16
17
# File 'lib/fakes3/s3_object.rb', line 15

def <=>(object)
  @name <=> object.name
end

#eql?(object) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/fakes3/s3_object.rb', line 10

def eql?(object)
  @name == object.name
end

#hashObject



6
7
8
# File 'lib/fakes3/s3_object.rb', line 6

def hash
  @name.hash
end