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
-
.existing ⇒ Object
rubocop:enable Metrics/ParameterLists.
- .non_existing ⇒ Object
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
14 15 16 17 18 19 20 21 |
# File 'lib/asset_cloud/metadata.rb', line 14 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.
3 4 5 |
# File 'lib/asset_cloud/metadata.rb', line 3 def checksum @checksum end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/asset_cloud/metadata.rb', line 3 def created_at @created_at end |
#exist ⇒ Object
Returns the value of attribute exist.
3 4 5 |
# File 'lib/asset_cloud/metadata.rb', line 3 def exist @exist end |
#size ⇒ Object
Returns the value of attribute size.
3 4 5 |
# File 'lib/asset_cloud/metadata.rb', line 3 def size @size end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/asset_cloud/metadata.rb', line 3 def updated_at @updated_at end |
#value_hash ⇒ Object
Returns the value of attribute value_hash.
3 4 5 |
# File 'lib/asset_cloud/metadata.rb', line 3 def value_hash @value_hash end |
Class Method Details
.existing ⇒ Object
rubocop:enable Metrics/ParameterLists
24 25 26 |
# File 'lib/asset_cloud/metadata.rb', line 24 def self.existing self.new(true) end |
.non_existing ⇒ Object
28 29 30 |
# File 'lib/asset_cloud/metadata.rb', line 28 def self.non_existing self.new false end |
Instance Method Details
#exist? ⇒ Boolean
9 10 11 |
# File 'lib/asset_cloud/metadata.rb', line 9 def exist? self.exist end |
#inspect ⇒ Object
32 33 34 |
# File 'lib/asset_cloud/metadata.rb', line 32 def inspect "#<#{self.class.name}: exist:#{exist} size:#{size.inspect} bytes>" end |
#new? ⇒ Boolean
5 6 7 |
# File 'lib/asset_cloud/metadata.rb', line 5 def new? !self.exist end |