require 'heracles/wrapper/notification_response' require 'delegate' # Using the DelegateClass inheritance option so that the Preconditions of the # base Heracles::Wrapper::NotificationResponse are preserved. class <%= class_name %> < DelegateClass(Heracles::Wrapper::NotificationResponse) def initialize(params) super(Heracles::Wrapper::NotificationResponse.new(params)) # The following two lines are logically equivalent # @pid = fetch(:pid) # @pid = params.fetch(:notification_payload).fetch(:pid) end # You may also want to define, at the class level the following: # attr_reader :pid end