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

#cache_controlObject

Returns the value of attribute cache_control.



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

def cache_control
  @cache_control
end

#content_dispositionObject

Returns the value of attribute content_disposition.



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

def content_disposition
  @content_disposition
end

#content_encodingObject

Returns the value of attribute content_encoding.



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

def content_encoding
  @content_encoding
end

#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

#custom_metadataObject

Returns the value of attribute custom_metadata.



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

def 
  @custom_metadata
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)
  object.is_a?(self.class) ? (@name <=> object.name) : nil
end

#eql?(object) ⇒ Boolean

Returns:

  • (Boolean)


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

def eql?(object)
  object.is_a?(self.class) ? (@name == object.name) : false
end

#hashObject



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

def hash
  @name.hash
end