Class: TicketMaster::Provider::Github::Comment

Inherits:
Base::Comment
  • Object
show all
Defined in:
lib/provider/comment.rb

Overview

The comment class for ticketmaster-github

Do any mapping between Ticketmaster and your system’s comment model here versions of the ticket.

Constant Summary collapse

API =
GithubComment

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*options) ⇒ Comment

Returns a new instance of Comment.



12
13
14
15
16
# File 'lib/provider/comment.rb', line 12

def initialize(*options)
  if options.first.is_a? Hash
    super options.first
  end
end

Instance Attribute Details

#prefix_optionsObject

Returns the value of attribute prefix_options.



9
10
11
# File 'lib/provider/comment.rb', line 9

def prefix_options
  @prefix_options
end

Class Method Details

.create(project_id, ticket_id, comment) ⇒ Object



32
33
34
# File 'lib/provider/comment.rb', line 32

def self.create(project_id, ticket_id, comment)
 self.new self::API.create(Project.find(:first, [project_id]), ticket_id, comment)
end

.find_by_attributes(project_id, ticket_id, attributes = {}) ⇒ Object



23
24
25
26
# File 'lib/provider/comment.rb', line 23

def self.find_by_attributes(project_id, ticket_id, attributes = {})
	warn "Github API only gets all comments"
	self::API.find_all(Project.find(:first, [project_id]), ticket_id).collect {|comment| self.new comment}
end

.find_by_id(project_id, ticket_id, id) ⇒ Object

declare needed overloaded methods here



19
20
21
# File 'lib/provider/comment.rb', line 19

def self.find_by_id(project_id, ticket_id, id)
 warn "This method is not supported by Github's API"
end

.search(project_id, ticket_id, options = {}, limit = 1000) ⇒ Object



28
29
30
# File 'lib/provider/comment.rb', line 28

def self.search(project_id, ticket_id, options = {}, limit = 1000)
 warn "This method is not supported by Github's API"
end