Class: GHArchive::PushEvent
- Inherits:
-
Event
- Object
- Event
- GHArchive::PushEvent
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
Class Method Details
.fits?(json) ⇒ Boolean
46
47
48
|
# File 'lib/gh-archive/events.rb', line 46
def self.fits?(json)
json['type'] == "PushEvent"
end
|
Instance Method Details
#before ⇒ Object
66
67
68
|
# File 'lib/gh-archive/events.rb', line 66
def before
@payload['before']
end
|
#commits ⇒ Object
70
71
72
|
# File 'lib/gh-archive/events.rb', line 70
def commits
@payload['commits'].map { |c| Commit.new(c) }
end
|
#distinct_size ⇒ Object
58
59
60
|
# File 'lib/gh-archive/events.rb', line 58
def distinct_size
@payload['distinct_size']
end
|
#head ⇒ Object
62
63
64
|
# File 'lib/gh-archive/events.rb', line 62
def head
@payload['head']
end
|
#push_id ⇒ Object
50
51
52
|
# File 'lib/gh-archive/events.rb', line 50
def push_id
@payload['push_id']
end
|
#size ⇒ Object
54
55
56
|
# File 'lib/gh-archive/events.rb', line 54
def size
@payload['size']
end
|