Class: ContentAddressableFile
- Inherits:
-
Object
- Object
- ContentAddressableFile
- Includes:
- ActsAsUploadedFile, SharedInterface
- Defined in:
- lib/content_addressable_file.rb,
lib/content_addressable_file/shared_interface.rb,
lib/content_addressable_file/read_only_storage.rb,
lib/content_addressable_file/acts_as_uploaded_file.rb
Defined Under Namespace
Modules: ActsAsUploadedFile, SharedInterface Classes: ReadOnlyStorage
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id) ⇒ ContentAddressableFile
constructor
Creates a new content-addressable file wrapper that uses the given id as content hash, assuming that it is a content addressable multihash.
Methods included from SharedInterface
#==, #content_addressable, #decode, #digest, #digest_hash_function, #digest_length, #hash
Methods included from ActsAsUploadedFile
Constructor Details
#initialize(id) ⇒ ContentAddressableFile
Creates a new content-addressable file wrapper that uses the given id as content hash, assuming that it is a content addressable multihash
17 18 19 |
# File 'lib/content_addressable_file.rb', line 17 def initialize(id) self.id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
10 11 12 |
# File 'lib/content_addressable_file.rb', line 10 def id @id end |