Sha256: d7171b200a487383312e5aaa79f3bcd7713db196bf4dd299e680e7ec6b2c5929
Contents?: true
Size: 539 Bytes
Versions: 9
Compression:
Stored size: 539 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 end end
Version data entries
9 entries across 9 versions & 1 rubygems