Class: Github::Event

Inherits:
Object
  • Object
show all
Defined in:
app/models/github/event.rb

Direct Known Subclasses

CommentEvent, PostReceiveEvent, PullRequestEvent

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ Event

Returns a new instance of Event.



11
12
13
# File 'app/models/github/event.rb', line 11

def initialize(payload)
  @payload = payload
end

Instance Attribute Details

#payloadObject (readonly)

Returns the value of attribute payload.



5
6
7
# File 'app/models/github/event.rb', line 5

def payload
  @payload
end

Class Method Details

.process!(payload) ⇒ Object



7
8
9
# File 'app/models/github/event.rb', line 7

def self.process!(payload)
  self.new(payload).process!
end

Instance Method Details

#process!Object

Raises:

  • (NotImplementedError)


15
16
17
# File 'app/models/github/event.rb', line 15

def process!
  raise NotImplementedError
end