Class: Telebugs::Config
- Inherits:
-
Object
- Object
- Telebugs::Config
- Defined in:
- lib/telebugs/config.rb
Constant Summary collapse
- ERROR_API_URL =
"https://api.telebugs.com/2024-03-28/errors"
Class Attribute Summary collapse
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_url ⇒ Object
Returns the value of attribute api_url.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#ignore_environments ⇒ Object
Returns the value of attribute ignore_environments.
-
#middleware ⇒ Object
Returns the value of attribute middleware.
-
#root_directory ⇒ Object
Returns the value of attribute root_directory.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
23 24 25 |
# File 'lib/telebugs/config.rb', line 23 def initialize reset end |
Class Attribute Details
.instance ⇒ Object
18 19 20 |
# File 'lib/telebugs/config.rb', line 18 def instance @instance ||= new end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
7 8 9 |
# File 'lib/telebugs/config.rb', line 7 def api_key @api_key end |
#api_url ⇒ Object
Returns the value of attribute api_url.
10 11 12 |
# File 'lib/telebugs/config.rb', line 10 def api_url @api_url end |
#environment ⇒ Object
Returns the value of attribute environment.
10 11 12 |
# File 'lib/telebugs/config.rb', line 10 def environment @environment end |
#ignore_environments ⇒ Object
Returns the value of attribute ignore_environments.
10 11 12 |
# File 'lib/telebugs/config.rb', line 10 def ignore_environments @ignore_environments end |
#middleware ⇒ Object
Returns the value of attribute middleware.
7 8 9 |
# File 'lib/telebugs/config.rb', line 7 def middleware @middleware end |
#root_directory ⇒ Object
Returns the value of attribute root_directory.
10 11 12 |
# File 'lib/telebugs/config.rb', line 10 def root_directory @root_directory end |
Instance Method Details
#reset ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/telebugs/config.rb', line 27 def reset self.api_key = nil self.api_url = ERROR_API_URL @middleware = MiddlewareStack.new @middleware.use Middleware::GemRootFilter.new self.root_directory = (defined?(Bundler) && Bundler.root) || Dir.pwd self.environment = "" self.ignore_environments = [] end |