Sha256: 7398d77aa3e4698c350fc8cec951d840b4fe535bda07cb683b6a19425b731af8
Contents?: true
Size: 607 Bytes
Versions: 14
Compression:
Stored size: 607 Bytes
Contents
module JSONAPIonify::Api module Resource::Definitions::Helpers def helper(name, &block) define_method(name, &block) end def authentication(&block) context :authentication, readonly: true, persisted: true do |context| OpenStruct.new.tap do |authentication_object| if instance_exec(context.request, authentication_object, &block) == false error_now :forbidden end end end before do |context| context.authentication end end def on_exception(&block) before_exception &block end end end
Version data entries
14 entries across 14 versions & 1 rubygems