Sha256: 29ac1c99d0993e657f1a70ea37d7334fb4e6d7b13f7290b4fe03baf156dc674d

Contents?: true

Size: 557 Bytes

Versions: 1

Compression:

Stored size: 557 Bytes

Contents

module CanTango::PermitEngine
  class License
    module Loader
      def load_rules name = nil
        return if !licenses || licenses.permissions.empty?
        name ||= self.class.to_s.gsub(/License$/, "").underscore

        return if licenses.permissions[name].nil?

        licenses.permissions[name].can_eval do |permission_statement|
          instance_eval permission_statement
        end
        licenses.permissions[name].cannot_eval do |permission_statement|
          instance_eval permission_statement
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cantango-0.8.0 lib/cantango/permit_engine/license/loader.rb