Class: GithubSearch::Issue

Inherits:
Searcher show all
Defined in:
lib/github-search/issue.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Searcher

#issues, #repos, #search, #users

Constructor Details

#initialize(attributes) ⇒ Issue

Returns a new instance of Issue.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/github-search/issue.rb', line 27

def initialize(attributes)
  @id             = attributes["id"]
  @number         = attributes["number"]
  @title          = attributes["title"]
  @body           = attributes["body"]
  @url            = attributes["url"]
  @labels_url     = attributes["labels_url"]
  @comments_url   = attributes["comments_url"]
  @events_url     = attributes["events_url"]
  @html_url       = attributes["html_url"]
  @user           = attributes["user"]
  @labels         = attributes["labels"]
  @state          = attributes["state"]
  @locked         = attributes["locked"]
  @assignee       = attributes["assignee"]
  @milestone      = attributes["milestone"]
  @comments       = attributes["comments"]
  @created_at     = attributes["created_at"]
  @updated_at     = attributes["updated_at"]
  @closed_at      = attributes["closed_at"]
  @score          = attributes["score"]
end

Instance Attribute Details

#assigneeObject (readonly)

Returns the value of attribute assignee.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def assignee
  @assignee
end

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def body
  @body
end

#closed_atObject (readonly)

Returns the value of attribute closed_at.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def closed_at
  @closed_at
end

#commentsObject (readonly)

Returns the value of attribute comments.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def comments
  @comments
end

#comments_urlObject (readonly)

Returns the value of attribute comments_url.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def comments_url
  @comments_url
end

#created_atObject (readonly)

Returns the value of attribute created_at.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def created_at
  @created_at
end

#events_urlObject (readonly)

Returns the value of attribute events_url.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def events_url
  @events_url
end

#html_urlObject (readonly)

Returns the value of attribute html_url.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def html_url
  @html_url
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def id
  @id
end

#labelsObject (readonly)

Returns the value of attribute labels.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def labels
  @labels
end

#labels_urlObject (readonly)

Returns the value of attribute labels_url.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def labels_url
  @labels_url
end

#lockedObject (readonly)

Returns the value of attribute locked.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def locked
  @locked
end

#milestoneObject (readonly)

Returns the value of attribute milestone.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def milestone
  @milestone
end

#numberObject (readonly)

Returns the value of attribute number.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def number
  @number
end

#scoreObject (readonly)

Returns the value of attribute score.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def score
  @score
end

#stateObject (readonly)

Returns the value of attribute state.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def state
  @state
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def title
  @title
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def updated_at
  @updated_at
end

#urlObject (readonly)

Returns the value of attribute url.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def url
  @url
end

#userObject (readonly)

Returns the value of attribute user.



6
7
8
# File 'lib/github-search/issue.rb', line 6

def user
  @user
end

Class Method Details

.sort_optionsObject



50
51
52
# File 'lib/github-search/issue.rb', line 50

def self.sort_options
  [:comments, :created, :updated]
end