Class: GHArchive::PullRequestEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/gh-archive/events.rb

Constant Summary

Constants inherited from Event

Event::IMPLEMENTATIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Event

#actor, #created_at, #initialize, #json, parse, #public?, #repo

Constructor Details

This class inherits a constructor from GHArchive::Event

Class Method Details

.fits?(json) ⇒ Boolean

Returns:

  • (Boolean)


122
123
124
# File 'lib/gh-archive/events.rb', line 122

def self.fits?(json)
    return json['type'] == "PullRequestEvent"
end

Instance Method Details

#actionObject



126
127
128
# File 'lib/gh-archive/events.rb', line 126

def action
    @payload['action']
end

#numberObject



130
131
132
# File 'lib/gh-archive/events.rb', line 130

def number
    @payload['number']
end

#pull_requestObject



134
135
136
# File 'lib/gh-archive/events.rb', line 134

def pull_request
    PullRequest.new(@payload['pull_request'])
end