Class: Uploadcare::SignedUrlGenerators::BaseGenerator
- Inherits:
-
Object
- Object
- Uploadcare::SignedUrlGenerators::BaseGenerator
- Defined in:
- lib/uploadcare/signed_url_generators/base_generator.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#cdn_host ⇒ Object
Returns the value of attribute cdn_host.
-
#secret_key ⇒ Object
readonly
Returns the value of attribute secret_key.
-
#ttl ⇒ Object
Returns the value of attribute ttl.
Instance Method Summary collapse
- #generate_url ⇒ Object
-
#initialize(cdn_host:, secret_key:, ttl: 300, algorithm: 'sha256') ⇒ BaseGenerator
constructor
A new instance of BaseGenerator.
Constructor Details
#initialize(cdn_host:, secret_key:, ttl: 300, algorithm: 'sha256') ⇒ BaseGenerator
Returns a new instance of BaseGenerator.
9 10 11 12 13 14 |
# File 'lib/uploadcare/signed_url_generators/base_generator.rb', line 9 def initialize(cdn_host:, secret_key:, ttl: 300, algorithm: 'sha256') @ttl = ttl @algorithm = algorithm @cdn_host = cdn_host @secret_key = secret_key end |
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
6 7 8 |
# File 'lib/uploadcare/signed_url_generators/base_generator.rb', line 6 def algorithm @algorithm end |
#cdn_host ⇒ Object
Returns the value of attribute cdn_host.
6 7 8 |
# File 'lib/uploadcare/signed_url_generators/base_generator.rb', line 6 def cdn_host @cdn_host end |
#secret_key ⇒ Object (readonly)
Returns the value of attribute secret_key.
7 8 9 |
# File 'lib/uploadcare/signed_url_generators/base_generator.rb', line 7 def secret_key @secret_key end |
#ttl ⇒ Object
Returns the value of attribute ttl.
6 7 8 |
# File 'lib/uploadcare/signed_url_generators/base_generator.rb', line 6 def ttl @ttl end |
Instance Method Details
#generate_url ⇒ Object
16 17 18 |
# File 'lib/uploadcare/signed_url_generators/base_generator.rb', line 16 def generate_url raise NotImplementedError, "#{__method__} method not present" end |