Class: Honeybadger::Api::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/honeybadger-api/environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_atObject (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

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/honeybadger-api/environment.rb', line 5

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/honeybadger-api/environment.rb', line 5

def name
  @name
end

#project_idObject (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_atObject (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.

Returns:

  • (Boolean)


22
23
24
# File 'lib/honeybadger-api/environment.rb', line 22

def notifications?
  @notifications
end