class GitHub::Payload::Formatter::Event

Attributes

payload[RW]

Public Class Methods

new(payload) click to toggle source
# File lib/github/payload/formatter.rb, line 45
def initialize(payload)
  @payload = payload['payload']
end
objectify(hash) click to toggle source
# File lib/github/payload/formatter.rb, line 49
def self.objectify(hash)
  struct = OpenStruct.new
  hash.each do |key, value|
    struct.send("#{key}=", value.is_a?(Hash) ? objectify(value) : value)
  end
  struct
end