lib/ncmb/acl.rb in ncmb-ruby-client-0.1.3 vs lib/ncmb/acl.rb in ncmb-ruby-client-0.1.4

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module NCMB class Acl include NCMB def initialize(params = nil) @@ -22,18 +24,20 @@ end end params.to_json end - def public(read_or_write, value = true) - @fields['*'.to_sym][read_or_write.to_sym] = value + def public(read_or_write, bol = true) + @fields['*'.to_sym][read_or_write.to_sym] = bol end + # :reek:DuplicateMethodCall { max_calls: 2 } def user(user, read_or_write, value = true) @fields[user.objectId.to_sym] = {read: true, write: true} unless @fields[user.objectId.to_sym] @fields[user.objectId.to_sym][read_or_write.to_sym] = value end + # :reek:DuplicateMethodCall { max_calls: 2 } def role(role, read_or_write, value = true) @fields[role.name.to_sym] = {read: true, write: true} unless @fields[role.name.to_sym] @fields[role.name.to_sym][read_or_write.to_sym] = value end end