Class: AssetCloud::Metadata
- Inherits:
-
Object
- Object
- AssetCloud::Metadata
- Defined in:
- lib/asset_cloud/metadata.rb
Instance Attribute Summary collapse
-
#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) ⇒ Metadata
constructor
A new instance of Metadata.
- #inspect ⇒ Object
- #new? ⇒ Boolean
Constructor Details
#initialize(exist, size = nil, created_at = nil, updated_at = nil, value_hash = nil) ⇒ Metadata
Returns a new instance of Metadata.
13 14 15 |
# File 'lib/asset_cloud/metadata.rb', line 13 def initialize(exist, size = nil, created_at = nil, updated_at = nil, value_hash = nil) self.exist, self.size, self.created_at, self.updated_at, self.value_hash = exist, size, created_at, updated_at, value_hash end |
Instance Attribute Details
#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
17 18 19 |
# File 'lib/asset_cloud/metadata.rb', line 17 def self.existing self.new(true) end |
.non_existing ⇒ Object
21 22 23 |
# File 'lib/asset_cloud/metadata.rb', line 21 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
25 26 27 |
# File 'lib/asset_cloud/metadata.rb', line 25 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 |