Sha256: 11d9cea77e2ec4f75cb1032f120f4a9a082748e63c8b4490d2e9d2fe93ff96d8

Contents?: true

Size: 390 Bytes

Versions: 22

Compression:

Stored size: 390 Bytes

Contents

# Public: proxy object to handle model Class as a resource
module Garage
  class MetaResource
    include Garage::Authorizable

    attr_reader :resource_class

    def initialize(resource_class, args = {})
      @resource_class = resource_class
      @args = args
    end

    def build_permissions(perms, user)
      resource_class.build_permissions(perms, user, @args)
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
the_garage-2.8.2 lib/garage/meta_resource.rb
the_garage-2.8.1 lib/garage/meta_resource.rb
the_garage-2.8.0 lib/garage/meta_resource.rb
the_garage-2.7.0 lib/garage/meta_resource.rb
the_garage-2.6.1 lib/garage/meta_resource.rb
the_garage-2.6.0 lib/garage/meta_resource.rb
the_garage-2.5.0 lib/garage/meta_resource.rb
the_garage-2.4.4 lib/garage/meta_resource.rb
the_garage-2.4.3 lib/garage/meta_resource.rb
the_garage-2.4.2 lib/garage/meta_resource.rb
the_garage-2.4.1 lib/garage/meta_resource.rb
the_garage-2.4.0 lib/garage/meta_resource.rb
the_garage-2.3.3 lib/garage/meta_resource.rb
the_garage-2.3.2 lib/garage/meta_resource.rb
the_garage-2.3.1 lib/garage/meta_resource.rb
the_garage-2.3.0 lib/garage/meta_resource.rb
the_garage-2.2.0 lib/garage/meta_resource.rb
the_garage-2.1.0 lib/garage/meta_resource.rb
the_garage-2.0.3 lib/garage/meta_resource.rb
the_garage-2.0.2 lib/garage/meta_resource.rb