Class: HerokuErrorPages::Config
- Inherits:
-
Object
- Object
- HerokuErrorPages::Config
- Defined in:
- lib/heroku_error_pages/config.rb
Instance Attribute Summary collapse
-
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
-
#aws_region ⇒ Object
Returns the value of attribute aws_region.
-
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
-
#error_page ⇒ Object
readonly
Returns the value of attribute error_page.
-
#maintenance_page ⇒ Object
readonly
Returns the value of attribute maintenance_page.
-
#s3_bucket_name ⇒ Object
Returns the value of attribute s3_bucket_name.
Instance Method Summary collapse
- #configure_error_page(template:, assigns: nil, layout: nil) ⇒ Object
- #configure_maintenance_page(template:, assigns: nil, layout: nil) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 |
# File 'lib/heroku_error_pages/config.rb', line 8 def initialize @aws_access_key_id = ENV.fetch("AWS_ACCESS_KEY_ID", nil) @aws_secret_access_key = ENV.fetch("AWS_SECRET_ACCESS_KEY", nil) @aws_region = "us-east-1" end |
Instance Attribute Details
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
5 6 7 |
# File 'lib/heroku_error_pages/config.rb', line 5 def aws_access_key_id @aws_access_key_id end |
#aws_region ⇒ Object
Returns the value of attribute aws_region.
5 6 7 |
# File 'lib/heroku_error_pages/config.rb', line 5 def aws_region @aws_region end |
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
5 6 7 |
# File 'lib/heroku_error_pages/config.rb', line 5 def aws_secret_access_key @aws_secret_access_key end |
#error_page ⇒ Object (readonly)
Returns the value of attribute error_page.
6 7 8 |
# File 'lib/heroku_error_pages/config.rb', line 6 def error_page @error_page end |
#maintenance_page ⇒ Object (readonly)
Returns the value of attribute maintenance_page.
6 7 8 |
# File 'lib/heroku_error_pages/config.rb', line 6 def maintenance_page @maintenance_page end |
#s3_bucket_name ⇒ Object
Returns the value of attribute s3_bucket_name.
5 6 7 |
# File 'lib/heroku_error_pages/config.rb', line 5 def s3_bucket_name @s3_bucket_name end |
Instance Method Details
#configure_error_page(template:, assigns: nil, layout: nil) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/heroku_error_pages/config.rb', line 14 def configure_error_page(template:, assigns: nil, layout: nil) @error_page = PageConfig.new( template: template, assigns: assigns, layout: layout ) end |
#configure_maintenance_page(template:, assigns: nil, layout: nil) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/heroku_error_pages/config.rb', line 22 def configure_maintenance_page(template:, assigns: nil, layout: nil) @maintenance_page = PageConfig.new( template: template, assigns: assigns, layout: layout ) end |