Class: Honeybadger::Api::Environment
- Inherits:
-
Object
- Object
- Honeybadger::Api::Environment
- Defined in:
- lib/honeybadger-api/environment.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#project_id ⇒ Object
readonly
Returns the value of attribute project_id.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Environment
constructor
Public: Build a new instance of Environment.
-
#notifications? ⇒ Boolean
Public: Whether notification are raised.
Constructor Details
#initialize(opts) ⇒ Environment
Public: Build a new instance of Environment
opts - A Hash of attributes to initialize a Environment
Returns a new Environment
12 13 14 15 16 17 18 19 |
# File 'lib/honeybadger-api/environment.rb', line 12 def initialize(opts) @id = opts[:id] @name = opts[:name] @notifications = opts[:notifications] @project_id = opts[:project_id] @updated_at = opts[:updated_at].nil? ? nil : DateTime.parse(opts[:updated_at]) @created_at = opts[:created_at].nil? ? nil : DateTime.parse(opts[:created_at]) end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
5 6 7 |
# File 'lib/honeybadger-api/environment.rb', line 5 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/honeybadger-api/environment.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/honeybadger-api/environment.rb', line 5 def name @name end |
#project_id ⇒ Object (readonly)
Returns the value of attribute project_id.
5 6 7 |
# File 'lib/honeybadger-api/environment.rb', line 5 def project_id @project_id end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
5 6 7 |
# File 'lib/honeybadger-api/environment.rb', line 5 def updated_at @updated_at end |
Instance Method Details
#notifications? ⇒ Boolean
Public: Whether notification are raised.
22 23 24 |
# File 'lib/honeybadger-api/environment.rb', line 22 def notifications? @notifications end |