Class: AssetCloud::Metadata
- Inherits:
-
Object
- Object
- AssetCloud::Metadata
- Defined in:
- lib/asset_cloud/metadata.rb
Instance Attribute Summary collapse
-
#checksum ⇒ Object
Returns the value of attribute checksum.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#exist ⇒ Object
Returns the value of attribute exist.
-
#size ⇒ Object
Returns the value of attribute size.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#value_hash ⇒ Object
Returns the value of attribute value_hash.
Class Method Summary collapse
Instance Method Summary collapse
- #exist? ⇒ Boolean
-
#initialize(exist, size = nil, created_at = nil, updated_at = nil, value_hash = nil, checksum = nil) ⇒ Metadata
constructor
rubocop:disable Metrics/ParameterLists.
- #inspect ⇒ Object
- #new? ⇒ Boolean
Constructor Details
#initialize(exist, size = nil, created_at = nil, updated_at = nil, value_hash = nil, checksum = nil) ⇒ Metadata
rubocop:disable Metrics/ParameterLists
16 17 18 19 20 21 22 23 |
# File 'lib/asset_cloud/metadata.rb', line 16 def initialize(exist, size = nil, created_at = nil, updated_at = nil, value_hash = nil, checksum = nil) self.exist = exist self.size = size self.created_at = created_at self.updated_at = updated_at self.value_hash = value_hash self.checksum = checksum end |
Instance Attribute Details
#checksum ⇒ Object
Returns the value of attribute checksum.
5 6 7 |
# File 'lib/asset_cloud/metadata.rb', line 5 def checksum @checksum end |
#created_at ⇒ Object
Returns the value of attribute created_at.
5 6 7 |
# File 'lib/asset_cloud/metadata.rb', line 5 def created_at @created_at end |
#exist ⇒ Object
Returns the value of attribute exist.
5 6 7 |
# File 'lib/asset_cloud/metadata.rb', line 5 def exist @exist end |
#size ⇒ Object
Returns the value of attribute size.
5 6 7 |
# File 'lib/asset_cloud/metadata.rb', line 5 def size @size end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
5 6 7 |
# File 'lib/asset_cloud/metadata.rb', line 5 def updated_at @updated_at end |
#value_hash ⇒ Object
Returns the value of attribute value_hash.
5 6 7 |
# File 'lib/asset_cloud/metadata.rb', line 5 def value_hash @value_hash end |
Class Method Details
.existing ⇒ Object
27 28 29 |
# File 'lib/asset_cloud/metadata.rb', line 27 def existing new(true) end |
.non_existing ⇒ Object
31 32 33 |
# File 'lib/asset_cloud/metadata.rb', line 31 def non_existing new(false) end |
Instance Method Details
#exist? ⇒ Boolean
11 12 13 |
# File 'lib/asset_cloud/metadata.rb', line 11 def exist? exist end |
#inspect ⇒ Object
36 37 38 |
# File 'lib/asset_cloud/metadata.rb', line 36 def inspect "#<#{self.class.name}: exist:#{exist} size:#{size.inspect} bytes>" end |
#new? ⇒ Boolean
7 8 9 |
# File 'lib/asset_cloud/metadata.rb', line 7 def new? !exist end |