Sha256: e6775e5844b0bf89506c2d0095d22c519602223a9f1392b1507cea7eca91a127

Contents?: true

Size: 310 Bytes

Versions: 9

Compression:

Stored size: 310 Bytes

Contents

module CanTango::Ability
  module Rules
    def calculate_rules
      rules
    end

    def normalize_rules!
      rules.flatten!
      rules.compact!
    end

    def rules
      @rules ||= []
    end

    def clear_rules!
      rules = default_rules
    end

    def default_rules
      []
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cantango-core-0.1.9.3 lib/cantango/ability/rules.rb
cantango-core-0.1.9.2 lib/cantango/ability/rules.rb
cantango-core-0.1.9.1 lib/cantango/ability/rules.rb
cantango-core-0.1.9 lib/cantango/ability/rules.rb
cantango-core-0.1.8 lib/cantango/ability/rules.rb
cantango-core-0.1.7 lib/cantango/ability/rules.rb
cantango-core-0.1.6 lib/cantango/ability/rules.rb
cantango-core-0.1.5 lib/cantango/ability/rules.rb
cantango-core-0.1.4 lib/cantango/ability/rules.rb