Sha256: 118647f693a14f6c4cce9929b12396564a7891a42b6e87f085eb4fbe1eddea4b

Contents?: true

Size: 337 Bytes

Versions: 1

Compression:

Stored size: 337 Bytes

Contents

module Policies
  class Base
    attr_reader :current_user, :current_role

    def initialize(current_user, current_role, object)
      @current_user = current_user
      @current_role = current_role

      unless object.is_a?(Symbol)
        instance_variable_set('@' + object.class.to_s.underscore, object)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
policies-1.1.0 lib/policies/base.rb