Class: ExceptionHub::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/exception_hub/issue.rb

Overview

Issue marshals exception information

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionString

!@attribute [rw]

Returns:

  • (String)

    Description to be displayed in the body of the Github issue



14
15
16
# File 'lib/exception_hub/issue.rb', line 14

def description
  @description
end

#github_issue_idInteger

!@attribute [rw]

Returns:

  • (Integer)

    The issue ID in Github



6
7
8
# File 'lib/exception_hub/issue.rb', line 6

def github_issue_id
  @github_issue_id
end

#titleString

!@attribute [rw]

Returns:

  • (String)

    Title of the Github issue



10
11
12
# File 'lib/exception_hub/issue.rb', line 10

def title
  @title
end

Instance Method Details

#send_to_githubObject

Creates the current Issue in Github



17
18
19
# File 'lib/exception_hub/issue.rb', line 17

def send_to_github
  ExceptionHub.current_octokit.create_issue("#{ExceptionHub.repo_owner}/#{ExceptionHub.repo_name}", self.title, self.description, :open_timeout => 5)
end

#to_yaml_propertiesObject



21
22
23
# File 'lib/exception_hub/issue.rb', line 21

def to_yaml_properties
  ['@github_issue_id', '@title']
end