class Payload

The base interface that the payload parser will be expecting

Public Class Methods

hash_keys() click to toggle source
# File lib/robot_sweatshop/payload/payload.rb, line 3
def self.hash_keys
  %w(author hash branch message repo_slug source_url clone_url)
end

Public Instance Methods

to_hash() click to toggle source
# File lib/robot_sweatshop/payload/payload.rb, line 7
def to_hash
  keys = Payload.hash_keys
  values = Payload.hash_keys.map { |method| method(method.to_sym).call }
  [keys, values].transpose.to_h
end