Class: ServerlessRedirector::Manifest::Redirect
- Inherits:
-
Struct
- Object
- Struct
- ServerlessRedirector::Manifest::Redirect
- Defined in:
- lib/serverless_redirector/manifest.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ Redirect
constructor
A new instance of Redirect.
- #serializable_hash(options = {}) ⇒ Object
Constructor Details
#initialize(h = {}) ⇒ Redirect
Returns a new instance of Redirect.
6 7 8 |
# File 'lib/serverless_redirector/manifest.rb', line 6 def initialize(h = {}) super h.fetch('path'), h.fetch('url') end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path
4 5 6 |
# File 'lib/serverless_redirector/manifest.rb', line 4 def path @path end |
#url ⇒ Object
Returns the value of attribute url
4 5 6 |
# File 'lib/serverless_redirector/manifest.rb', line 4 def url @url end |
Instance Method Details
#serializable_hash(options = {}) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/serverless_redirector/manifest.rb', line 10 def serializable_hash( = {}) { 'path' => path, 'url' => url } end |