Method: Aliyun::OSS::OSSObject#key
- Defined in:
- lib/aliyun/oss/object.rb
#key ⇒ Object
Returns the key of the object. If the key is not set, a NoKeySpecified exception will be raised. For cases where you are not sure if the key has been set, you can use the key_set? method. Objects must have a key set to be saved onto OSS. Objects which have already been saved onto OSS will always have their key set.
449 450 451 |
# File 'lib/aliyun/oss/object.rb', line 449 def key attributes['key'] or raise NoKeySpecified end |